- Advertisement -
Home ✔Naija HB Special How to Add AdSense Auto Ads to Google AMP Pages in WordPress

How to Add AdSense Auto Ads to Google AMP Pages in WordPress

Must Read

Desmond Elliot’s list of movies, Awards, and Nominations up to 2020

In this article, we'll be talking about Desmond Elliot's list of movies, awards, and nominations up to...

List of Mercy Johnson Movies up to 2020

We know many fans are interested in knowing the names of all the movies Mercy Johnson has...

Flavour Albums & Songs up to 2020

Flavour released his debut album in 2005. Since then he has gone on to release several others....

For AdSense publishers that use Google AMP by Automattic, after setting up auto ads and adding to your WordPress site, you must have noticed that Google ads don’t appear on the the Accelerated Mobile Pages (AMP) of your site.

- Advertisement -

This could cost you thousands of dollars in earnings, if a great deal of your visitors use their mobile devices.

After receiving several requests from my readers to publish a tutorial to correct this anomaly, I have decided to do just that. This tutorial will show you how to add AdSense on AMP pages.

You can easily display ads on AMP pages using several plugins. However, many of them come at an extra cost. You don’t have to spend a dime to get this done – It’s not as difficult as you imagine.

To display ads on AMP with this guide, we will be making use of the latest innovative feature called “Auto Ads”.

The auto ads feature allows you to add a simple code to your site, and after adding that code you can easily manage your ads directly from your AdSense dashboard.

Follow this guide: setup auto ads and add to WordPress

If you are very familiar with your AdSense Dashboard, you must have noticed a new feature located within Optimization>>Lab. This feature is called “AMP auto ads (text and display) – A great new way to monetize your AMP pages. Switch on this lab to place text and display ads on any AMP page that you’ve tagged with the AMP Auto ad code”.

First thing you need to do is toggle on this feature and click on get code.

AMP Auto ads – Text & display

You will be provided with an AMP code you have to add to two places on your website.

Copy and paste the AMP code in 2 places.
- Advertisement -

AdSense has a guide to add this code to your site. However, you may find this difficult to implement without proper guidance if you are not a tech savvy. This post will help you add those AMP codes to your site even if you are new to all these stuff.

Right now, customizing the AMP plugin or adding a custom code to your theme functions have not been working. So, to add auto ads, we’ll make use of a plugin created by a Google employee.

How to display auto ads in AMP

Download AMP Auto Ads plugin from github.

Install the plugin on your WordPress site manually. Read: how to install a wordpress plugin manually.

After installing the plugin, hover your mouse on plugins in your WordPress dashboard and click on plugin editor.

In the select plugin to edit section, make sure you choose “AMP Auto Ads”.

Afterwards, replace the dash just after ‘const AD_CLIENT’ with your AdSense publisher ID.

All AdSense publisher ID are of the format: ‘ca-pub-3084123456789012’. To know what yours is, visit your AdSense dashboard and check the address bar of your browser.

The final code in the plugin editor should look like what’s in the image below:

Finally, click on ‘Update File’ to implement the changes.

Your AMP pages will begin to show ads within a few minutes; say 10 to 20 minutes.

- Advertisement -

Our Health, Educational, Career journals, and the likes are not intended to serve as substitutes for professional advice. Therefore, we urge you to consult an appropriate professional before making any decision.


    • If you followed the above steps properly, then ads will definitely show up soon. 20 minutes is not so bad; Google says wait for a few hours. In some cases it might even take up to 48 hours.

  1. I just tried the updated instructions offerrd in this post but the ads are not being displaced in my Amp for Google plugin.
    PS: I also got the Auto Amp Ad plugin and did as seen in the images.

  2. It is not working for me, I am using Adsense amp ads and the plugin you mentioned above, what should I do?

  3. Hi Matt stephens! after we add the code via filezilla, some errors came up on google console. “Custom JavaScript is not allowed” but when we check on validator.ampproject it got pass. what can you advise to do?

    • Hi Ajit, please do not add the code to your header.php … It might break your site. Adding those code snippets to your functions.php works very fine, so there’s no reason whatsoever not to add it there.

  4. Hi Matt, I think you should do a tutorial for AMP for WordPress. It has more advance features than the AMP by Automattic and much easier to setup. I only have issue with placing Ad code on it even though it has a dedicated place for Ad placement. This will be helpful for those who don’t use the AMP by Automattic. Thanks.

  5. hey i added directly into the AMP plugin under head and body but ads are still not listed on my page, I can get injected code in my amp page but there is no any ads showing for my website. Can you please help me out. i don;t want to use any plugin to show ads. I a using official AMP plugin which was launched by automatic.

  6. Thanks for this. The tutorial is really detailed but there are lot of things I can’t tamper with. And I really need ads writhin my amp pages

    • Hi Saheed, it’s actually not so good to play around with codes if you’re not very familiar with WordPress; that’s why you must always backup your site before adding any codes to it. However, I carried out all the required tests on my developmental website before publishing this guide.

  7. I don’t have child theme for my site.. and you said its not recommened to do this on your main theme.. what do I do? I really need this AMP to work and I need to place my ads to

Comments are closed.

- Advertisement -


JAMB Brochure 2020: Download Correct & Complete pdf Version

You can download the JAMB brochure pdf from the JAMB portal using your smartphone or computer. Or,...

10 Best Engineering Courses Offered at Nigerian Universities

Anyone who wishes to study Engineering in Nigeria must be highly selective. The reason is, although some engineering fields are undisputedly awesome...

Engineering Courses Offered at Nigerian Universities (2020)

We've compiled a list containing 36 engineering courses you can study at the various Nigerian universities. There are over...

How to Make Money Online Without Paying Anything (2020 Update)

Are you interested in learning how to make money online without paying anything in 2020? You are not...

List of Nigerian Universities that offer Architecture

Interested in knowing the Nigerian Universities that offer architecture? You'll soon find out. It is imperative that all aspiring architects...

Follow us


See more