How to Add Google AdSense Ads on WordPress AMP Pages

By | June 18, 2021

This article will help you to know how to add AdSense ads on AMP pages on WordPress websites or blogs.

Google AdSense is a program that allows webmasters, website owners or blog owners to earn income by adding AdSense ads to their blog posts or we say articles.

When the user visit your page, blog post or article and interact with ads which are shown by AdSense on that page, post or article and clicks it. You get a small amount of money from AdSense. The more users you have, the more you may be able to earn.

Create AdSense Account

It is easy to use AdSense on any website or Blog. To do that, simply:

  • Create Your Google E-mail account.
  • Go to the Official Website of AdSense.
  • Signup your account
  • Add Your website to AdSense
  • Copy code and paste in your website
  • Send it for approval once your website is approved. You will be eligible to earn money.

However, if you’re running AMP pages, the process isn’t same. To add AdSense on AMP pages, you’ll have to do:

What is AMP?

Accelerated Mobile Pages (AMP) is a simple and robust web components framework that makes it easy to build fast websites that are user-first and make money. AMP provides long-term success for your web strategy with distribution across popular platforms and reduced operating costs. If you’re running a WordPress blog or website and want to rank better in search engine result pages, you may need to enable AMP for your pages.

Install WordPress AMP Plugin

A simple way to enable AMP pages for WordPress sites that are running themes not built on AMP standard is to install a recommended AMP plugin called AMP.

The AMP plugin for WordPress supports fully integrated AMP publishing for WordPress sites, with robust capabilities and granular publisher controls.

After you’ve installed and activated the plugin, choose your template mode:

  • Standard: Choose if you want to have a single AMP version of your site
  • Transitional: Choose if you want to have both AMP and non-AMP versions of your site
  • Reader: Choose if your WordPress theme is not AMP-compatible.

If your WordPress theme is AMP-compatible, you can choose from any of these modes. If you want to test AMP first, you can start with Transitional. After testing, you can switch from Transitional to Standard anytime by visiting your AMP for WordPress plugin settings.

Get AdSense Ads for AMP

After installing WordPress AMP plugin, go to your AdSense account and enable AMP ads. Turn on Auto ads for AMP and Google will automatically show ads on all the AMP sites in your account. Just add 2 pieces of code to each AMP site that you want ads to appear.

  • Go to AdSense
  • At the left of page Click Ads > Overview.
  • Under Overview there are three sections By Site, By Ad Unit and Global Setting.
  • Go to By site. At the right center of page you will see AMP.
amp-on-wordpress
  • After clicking that a popup will appear.
  • You will see Let Google place display ads on your AMP sites Enable that button.

After enabling AMP ads in AdSense, you will be provided two pieces of codes to add to you site. Codes will be similar to the below:

Note: Don't copy this code.
<script async custom-element="amp-auto-ads"
        src="https://cdn.ampproject.org/v0/amp-auto-ads-0.1.js">
</script>
<!-- wp:code -->
<pre class="wp-block-code"><code>&lt;amp-auto-ads type="adsense"
        data-ad-client="ca-pub-XXXXXXXXXXXX">
&lt;/amp-auto-ads></code></pre>
<!-- /wp:code -->

Method of inserting ad code

There are different methods you can use to insert your ad code. If you’re unfamiliar with coding, you might want to use an ad plugin or a theme to insert your ad code.

Advanced Ads plugin

This method is used for both Auto ads and ad units. Also, supporting all template modes. Standard, Transitional and Reader. With this plugin, you can define conditions to display ads on specific pages or to specific visitors only. You can optimize your ad revenue using the ad rotation and split test features.

Download & install Advanced Ads Plugin.

Installing Advanced Ads Plugin is the first step to bring AdSense on your WordPress site:

  1. Log in to your WordPress dashboard and click on Plugins and Add New.
  2. Enter “Advanced Ads” into the search form on the top right corner and hit Enter to start the search.
  3. Look for Advanced Ads in the search results and click on the Install Now button.
  4. Click on Activate Plugin.
  5. You should see the new Advanced Ads item in your WordPress menu.
amp-ads-on-wordpress

Connect your Google AdSense account

Follow these steps to verify your site with AdSense

  1. Make sure that you have Advanced Ads activated on your WordPress site (see above)
  2. Go to Advanced Ads > Settings > AdSense
  3. Connect to your AdSense account using the Connect to AdSense button
  4. Login to your AdSense account, verify Advanced Ads and copy the activation key into the field within Advanced Ads
  5. Enable the Verification code and Auto Ads option. No further coding is needed.
  6. Enable the AMP Auto ads option under Advanced Ads > Settings > AdSense > AMP.
  7. Scroll below Click Save setting on this page button.
  8. To fully support AdSense AMP ads in WordPress, you need to install Responsive add-on.
  9. Your AMP and non-AMP pages should show up AdSense ads now.

The code will be placed automatically in the right place.

Converting AdSense to AMP automatically

Now you have to download their Responsive Ads plugin that converts your AdSense ads automatically to the AMP format. You can also change the size of the ads on AMP pages or disable some AdSense ads on AMP pages completely.

  • To fully support AdSense AMP ads in WordPress, you need Advanced Ads installed and their Responsive add-on
  • Set up your AdSense ads in Advanced Ads according as shown above.

Ad Inserter plugin

Ad Inserter is a universal plugin that can insert any code or ads anywhere on the wordpress page.

This method is used for both Auto ads and ad units. Also, supporting all template modes. Standard, Transitional and Reader

  • To install Ad Inserter plugin log in to your WordPress dashboard
  • Click on Plugins in the WordPress menu
  • Click on Add New.
  • On top of the plugin page, search for ad inserter, select Ad Inserter from the results,
  • Click Install and then Activate the plugin.
  • Alternatively you can download it to your disk and then click on Upload Plugin, choose file you have downloaded, click on Install now and then Activate the plugin.
Ad-inserter

Here is the procedure that will help you to show AdSense ads on amp pages.

Insert Headers and Footers plugin

This method is only used for Auto ads. And supporting all template modes. Standard, Transitional and Reader


Add Code via AMP Plugin

  1. Then go to your WordPress dashboard and navigate to Plugins ==> Plugin Editor.
  2. At the right of page you will se a inline drop down.
  3. Select AMP plugin Click Select.
  4. Then open the html-start-php page.
  5. Paste the code inside the <head> and </head> section of the page as shown below.
  6. Next, copy the second piece of code and paste into the body section of your AMP page. In the same html-start-php page paste the code in the body section as shown below:
  7. Scroll down and Click on Update File.

After saving the page, ads should begin showing on your WordPress AMP pages after few minutes.

Questions and Answers

Is AMP good for AdSense?

Is AMP good for AdSense? Yes, it is. Ads load faster. When the ads load fast, it creates a positive impact on user’s perception and advertiser performance.

What is AMP site in AdSense?

Accelerated Mobile Pages (AMP) is an open source project that aims to make the mobile web better by providing a framework for building content pages that consistently load fast.

Does AdSense work with AMP?

Auto ads for AMP automatically place AdSense Auto ads on your AMP pages. After you’ve added the AMP auto script and ad code, Google will automatically show ads on your AMP pages at optimal times when they’re likely to perform well and provide a good experience.

What is AMP compliance?

More than just speed, it’s compliance that makes AMP post-click landing pages so powerful. By adhering to the framework’s design principles, you ensure that third parties can count on an optimized mobile experience to direct traffic to.


Leave a Reply

Your email address will not be published. Required fields are marked *