Amazon Affiliate has launched a new program where you can get revenue from other countries. There is custom Javascript code which is shown below.
<div id=”amzn-assoc-ad-285a9c11-c070-4361-a812-04a2a0d2f7db”></div><script async src=”//z-na.amazon-adsystem.com/widgets/onejs?MarketPlace=US&adInstanceId=285a9c11-c070-4361-a812-04a2a0d2f7db”></script>
In the theme panel it says not to use <script></script> but this screws up the code.
“Copy the JavaScript code below and integrate into the footer/before the end tag of the body of your website”
That’s is. Thanks!
-
This reply was modified 8 years by
sasquatters.
Sorry about the delay, seems the topic has been overlooked. The end tag of the body would be here in the footer file
– https://www.screencast.com/t/YeLcPUIc
So try entering the code as mentioned by them.
So I should add it exactly like they have…
<div id=”amzn-assoc-ad-285a9c11-c070-4361-a812-04a2a0d2f7db”></div><script async src=”//z-na.amazon-adsystem.com/widgets/onejs?MarketPlace=US&adInstanceId=285a9c11-c070-4361-a812-04a2a0d2f7db”></script>
?
Your reply is a bit confusing.
Thank you.
Indeed, add the code before the closing body tag as instructed by them. The closing body tag is in the file I mentioned above
– https://www.screencast.com/t/js2kabseMez
They said to enter the provided code before the ending body tag in the footer, so try entering the code there
– https://www.screencast.com/t/JF1uTJp93
Thank you Simon, I didn’t see that I had to ftp to get the footer.php. I thought I could access it from within the theme panel using the custom code section.
Hey guys, did you manage to get this to work? I’ve been troubleshooting this for days and haven’t been able to get it to work. I’ve even contacted Amazon and they can’t figure out what’s going on either.
I’ve tried (one at a time, obviously):
- Adding the code in the footer, before the ending body tag
- Adding the code to the Javascript box in the admin panel
- Adding the code to the the HTML box in the admin panel
- Clearing the cache
- Using incognito
- Using VPNs from different countries
- Trying with/without link cloaking plugins
The only thing I haven’t been able to test is having it physically within the <footer></footer> tags. See below for what I mean – at the moment, the script isn’t technically within the “footer” although it’s before the </body> tag:
<footer>
Save
<div class="tdw-more-info-text">Write CSS OR LESS and hit save. CTRL + SPACE for auto-complete.</div>
<div class="tdw-resize"></div>
</footer>
From a technical point of view, I don’t see how it would really make a difference, but it’s the only thing that I can think of.
Hi,
@Chris There is a theme panel section now that will output the code in the footer, before the HTML body tag
– https://www.screencast.com/t/gaO5riWZo
I believe that is where the code needs to be loaded. Check the page source after adding it, it should appear in the footer, above the closing body tag.
Or manually add it in the file shown above in the main theme file, or in a child theme so you don’t loose it after an update. Either way would load the code. Inspect the page with the browser inspector, see if the Amazon section is there, maybe it is a CSS issue of some kind.