Archived topic
Where exactly to place an Amazon one-link code ?
5 replies · Started by Doug on August 27, 2018
They say to place it in footer right before the </body> text ends. The code looks something like this(note:i'll edit my id)
<script async src="//z-na.amazon-adsystem.com/widgets/onejs?MarketPlace=US&adInstanceId=11111111-1abc-543a-abc1-a12345678910a"></script>
I placed it in the footer as instructed, but i'm curious as to how i know it will work.
Is there a way to test it ?
Hi there,
You can use the wp_footer hook inside the Hooks Element module:
https://docs.generatepress.com/article/hooks-element-overview/
I'm not sure how to test if it's working either. Might be a better question to ask Amazon/source of the code.
Let me know if this helps :)
I'll take a look into the hooks thing. I know nothing about coding, but I'll try and figure it out.
I was hoping to find a <body> or <head> spot in between the closing tags on the header or footer that would be active for every page.
I'm new to building a website, so most of my time is spend doing trial and error and watching youtube videos or reading articles to figure things out.
I'm assuming the hooks thing, if i figure it out correctly, will work for my google analytics code also.
Thanks for reply Leo
If they suggest to insert the code before the end of body then that's definitely the wp_footer hook.
wp_head would be before the body tag.
before_header would be right after the opening of body tag.
Thank you Leo
No problem :)