How to insert Amazon iframe on posts

Hello, considering that onebox seems not to work properly with amazon other than .com (since 2019, info), I would like to try using iframes.

The code to insert is:
<iframe style="width:120px;height:240px;" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" src="//rcm-eu.amazon-adsystem.com/e/cm?lt1=_blank&bc1=000000&IS2=1&bg1=FFFFFF&fc1=000000&lc1=0000FF&t=TAG_REMOVED&language=it_IT&o=29&p=8&l=as4&m=amazon&f=ifr&ref=as_ss_li_til&asins=B07WHMHLJQ&linkId=69e9808ddc7b121e4fa9d501cdac312e"></iframe>

I entered the following addresses in the option allowed iframes
https://rcm-eu.amazon-adsystem.com/
https://www.amazon.it

But I don’t see the banner, where am I wrong?
Obviously there are no active adblocks.

You could try just entering //rcm-eu.amazon-adsystem.com into the allowed iframes site setting. I think that will display an iframe, but it might not look very good. If you try this, you’ll need to rebuild the HTML for any existing posts that you’ve added the iframe to.

2 Likes

You don’t need an iframe. You can use their snippets directly.

Btw Oneboxing would break your affiliate agreement as they would not be happy with the use of their logo in that way. They once closed my account for that transgression.

1 Like

Thanks Simon, with //rcm-eu.amazon-adsystem.com the iframes are seen but like this
Immagine 2021-04-24 103013

Only with amazon.com you can also create links to images :frowning_face:


Text + Image create only an iframe… for this I was hoping that onebox would work with Amazon other than .com but maybe this is not a priority for developers.

2 Likes

Yep that’s true, only works with image snippets, text+image renders an iframe.

I think this is just a trivial CSS issue, try:

.topic-post iframe {
    height: 240px;
}

Adjust as you see fit.

NB Bear in mind that will affect all iframes in posts.

You could get more specific using the data-post-id, data-topic-id or even the data-user-id

2 Likes

Thanks @merefield, forum users don’t like this solution very much but I don’t have other alternatives.

I use image snippets inside a Markdown table. Allows me to add affiliate disclaimer above the link. Lack of a disclaimer is likely to incur Amazon wrath too :grimacing:

1 Like

Great idea!
Can you give me an markdown table example?

Sure, something like:

<sup>*(NB from admin: As an Amazon Associate I earn from qualifying purchases.  Thanks for your support!)*

|Albott Pro Stunt Scooter|
|:-:|
|<AMAZON LARGE IMAGE SNIPPET>|

One of the advantages of this approach btw, is Discourse keeps a counter by the image for the number of times it’s been clicked :slight_smile: :rocket:

4 Likes

It’s perfect, thank you! :grinning:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.