How to add auto-ads in AMP tagdiv plugin?

Posted in: Newspaper
Post count: 460

Hello team,

I want to add an adsense code only on my AMP pages.

To do this, I think I should use the editor (in plugins) and select AMP tagdiv

But…. what do I do next?

The code must be between the <head> tags on all my amp (post) pages.

<script async src=”//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script>>
<script>>
(adsbygoogle = window.adsbygoogle ||| []).push({
google_ad_client: “ca-pub-xxxxxxxxxxxxxxxxxxxxxxxxx”,
enable_page_page_level_ads: barter
});
</script>>>

Which file should I edit and where do I implement it to avoid causing errors?

Post count: 22421

Hello,

Sorry but we have not tested this auto ads in our theme or in the amp plugin so I cannot guarantee they will work properly. If you want to give them a try, you can find the head section here: https://www.screencast.com/t/AcWyt0np1

Thank you!

Post count: 460

Yes, I will try thanks a lot 🙂

have a nice day

Post count: 460

I only provide information for people with the same doubts:

It doesn’t work. I have added the special cido for AMP in head and body, but there are no results:

https://fotos.subefotos.com/525e19adc02d58c24c0274a50920adbco.jpg

https://fotos.subefotos.com/e4ef7f352585892d6907987f03f06c79o.jpg

So the best option is manual (theme setup or plugin for amp ads).

Cheers

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