Amazon OneTag

Posted in: Newspaper
Post count: 122

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.

Post count: 20688

Hi,

If you could mention what the code provider instructions are, it would be helpful. maybe it could be entered in a different location or directly in the theme files.

Thanks

Post count: 122

“Copy the JavaScript code below and integrate into the footer/before the end tag of the body of your website”

That’s is. Thanks!

Post count: 122

Any info Simon?

Thanks

Post count: 20688

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.

Post count: 122

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.

Post count: 20688

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

Post count: 122

I add it to the Javascript section?

Thank you

Post count: 20688

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

Post count: 122

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.

Post count: 10

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.

Post count: 20688

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.

Post count: 10

Manually adding the code to the footer.php worked out better. And I think it is a CSS issue – thanks!

Viewing 13 posts - 1 through 13 (of 13 total)
The forum ‘Newspaper’ is closed to new topics and replies.