I am using Newspaper Theme. To implement Google AMP auto ads:
1. I need to add the following code once in between the head tags of the AMP site’s HTML.
<script async custom-element=”amp-auto-ads”
src=”https://cdn.ampproject.org/v0/amp-auto-ads-0.1.js”>
</script>
My question is WHERE & HOW to place the above code.
2. I also need to paste the following code immediately after the <body> tag of the pages where the ads to appear.
<amp-auto-ads type=”adsense”
data-ad-client=”ca-pub-4830297679832206″>
</amp-auto-ads>
My question is WHERE & HOW to place the above code.
Hi Renu Bakshi,
As Satwik said, our theme already have this option, if you want you can check the guide from this similar topic -> https://forum.tagdiv.com/topic/amp-auto-ad-codes/
Thank you!
Hi Satwik/Calin:
Thanks for your help. If I place the 2nd code as Satwik has advised:
“Go to Theme panel -> Mobile Theme -> AMP Ads -> paste the second code in “ADSENSE AUTO ADS FOR AMP” field.”
So, as I will be using ADSENSE AUTO ADS FOR AMP, will I have to place the individual mobile ads codes also.
Because as the Google adsense will be determining number of ads & placing the ads at the suitable places – so there may not be need to place the individual mobile ads code.
Please advise.
Thanks & Regards……. Renu Bakshi
Hi Renu Bakshi,
The auto amp ads will be display only on amp, but you can still set ad in mobile them and these will be display too -> https://i.imgur.com/kwgVh65.png (the ads will be display on amp because both are using the same template).
Usually google choose how many auto ads to display and this usually depends on the length of your posts.
Thank you!