I have a script and div tag from amazon to put ads on my site but when I put them in my app the ads do not show up.
The code from amazon looks like this:
<div id="amzn-assoc-ad-xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"></div>
<script async src="//z-na.amazon-adsystem.com/widgets/onejs?
MarketPlace=US&adInstanceId=xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"></script>
I have tried adding the
<script async src="//z-na.amazon-adsystem.com/widgets/onejs?
MarketPlace=US&adInstanceId=xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"></script>
to the index.html file as well as something like this
useEffect(() => {
const script = document.createElement("script");
script.src = "//z-na.amazon-adsystem.com/widgets/onejs?
MarketPlace=US&adInstanceId=xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
script.async = true;
document.body.appendChild(script);
}, []);
The <div tag is in the return of my functional component, but no ads show up. Any help is very appreciated.