Here is code that I’ve put together to incorporate amp-auto-ads into a site: https://gist.github.com/westonruter/a41573b932e24810b09949136b9a8445
Note you’ll need need to supply the AD_CLIENT value.
respected sir, really i am beginner and no knowledge about coding. can you guide me where to paste this code?
1. Download the ZIP file: https://gist.github.com/westonruter/a41573b932e24810b09949136b9a8445/archive/18ebd403f6002a3639a1249a7d3f29046d34a170.zip
2. Rename the file to thecollegestudy-amp-auto-ads.zip.
3. Install the plugin ZIP in WordPress via Plugins > Add New > Upload.
4. In the Plugin Editor, locate this plugin in the dropdown and select example-amp-auto-ads.php.
5. Modify AD_CLIENT in the WordPress file editor and save.
6. Activate the plugin.
One thing more, Adsense ads taking too time to load, even my visitor scrolls and go to the end of page, AdSense still ads still not loaded.
You’ll have to contact AdSense support about that.
Hi,
There are two codes given by Adsense for AMP one script has to paste in the head tag of AMP HTML and another one has to paste in the body of AMP HTML.
The process you are saying above i.e to add code here
const AD_CLIENT = '________________'; // πππ This must be populated with your appropriate value.
But you have not explained which code have to paste here HEAD or BODY or both.
Here is the screenshot by adsence auto ad AMP setup page – http://prntscr.com/mvfjla
Regards,
techiebraj
@techiebraj the plugin automatically adds the required code to the HEAD and BODY. You just have to provide the AD_CLIENT.
@westonruter sir as you explained above and gave me the plugin for showing auto ads, i followed same way but most time auto ads stop showing on my site. Can you help me why its happening?
I suggest inquiring of https://support.google.com/adsense/community?hl=en
I am not an expert on AdSense.