How to Display Google AdSense Ads on WordPress AMP Pages

Displaying advertisements on AMP pages requires AMP-compatible advertising code rather than conventional JavaScript ad scripts. WordPress publishers can implement Google AdSense through AMP Auto ads or manually configured advertising placements.

constantine vasileiadis
By
Constantine Vasileiadis
constantine vasileiadis
Graphic & Web Designer, Developer and Digital Marketing Specialist
Constantine Vasileiadis is a digital marketing and SEO specialist, web developer, graphic designer, digital entrepreneur, and independent digital publisher with professional experience dating back to 2008....
- Graphic & Web Designer, Developer and Digital Marketing Specialist
5 Min Read

AMP pages utilise a specific version of HTML. This affects how external scripts, ads and interactive content behave.

Adding standard Google AdSense code to an AMP page can cause issues including: non-displaying ads and/or AMP validation problems.

Luckily, there are specific AMP ad solutions which can be used and still conform to the AMP standards.

Is AMP still useful?

Consider whether you really need to use AMP on your site.

Whilst Google does not require sites to use AMP to be included in its Top Stories and AMP is not itself a ranking factor, sites can still benefit from AMP.

Well optimised, responsive WordPress sites can perform extremely well on mobile, without the need for AMP pages.

If your site already attracts traffic via AMP URLs then it is still fully acceptable to add advertising to your AMP pages.

Use Google Site Kit to add AdSense Auto ads to your AMP pages

Google Site Kit allows users to add AdSense Auto ads to their AMP pages, where they are using the recognised AMP WordPress plugin.

To do this:

1. Access your WordPress Dashboard. Go to Plugins and then Add New Plugin.

2. Download and install Google Site Kit.

3. Log in to your Google account.

4. Access Site Kit and then Settings and then Connect More Services.

5. Link your verified Google AdSense account.

6. Permit Site Kit to add AdSense code.

7. Activate AMP Auto ads on your AdSense account.

As Site Kit adds advertising code, this helps to avoid AMP validation issues.

Do not add advertising code more than once via plugins.

Manually add AMP Auto ads

Log in to your AdSense account and go to the Ads section.

Activate the option to automatically show advertising on your AMP site.

Google produces two pieces of code.

The first is used to add the AMP ad element and should be added to the HTML head section:

The second is to be added right after the start of the HTML body:

Ensure that you amend the code so that it reflects your AdSense publisher ID.

Both codes need to be added to your AMP pages. Again, utilise an AMP ready plugin or template to ensure that these are added to the relevant areas of your site.

Individually add AMP ads

For those wanting more control over where advertising is shown, bespoke AMP ad elements can be added.

Produce a display ad element in your AdSense account and then retrieve the relevant AMP code.

The below script should also be added to the HTML head:

Responsive advertising can then be added to the body of your page. Example code would look like this:

Ensure that you change the publisher and ad slot IDs to those provided by Google.

WordPress plugins including Advanced Ads, allow users to manage and add advertising to their AMP pages, without needing to edit themes.

How to Confirm that AMP Advertising is Functioning Successfully

Access an AMP version of one of your published posts and review the page’s HTML code.

Look for references to amp-ad or amp-auto-ads to verify that ad elements have been added.

Then run an AMP validation test.

If advertising is not appearing, check for:

– Whether or not your AdSense account has been verified.

– Whether or not the publisher and/or ad slot IDs are incorrect.

– AMP validation problems.

– Multiple advertising codes being added.

– WordPress cache related issues.

– Advertising being blocked.

– Consent related limitations.

Publishers targeting people in areas where Google requires consent, should also deploy an appropriate, Google certified consent management system which is AMP ready.

Whilst advertising code may be valid, there are further factors which will determine whether or not advertising will display on each page visit including: ad space, consent and Google’s ad serving choices.

Share This Article
constantine vasileiadis
Graphic & Web Designer, Developer and Digital Marketing Specialist
Follow:
Constantine Vasileiadis is a digital marketing and SEO specialist, web developer, graphic designer, digital entrepreneur, and independent digital publisher with professional experience dating back to 2008. He studied Economics at the University of Macedonia and Graphic & Web Design at IEK AKMI, complementing his educational background with professional training in digital marketing, search engine optimization, social media advertising, and motion graphics. In 2017, he founded Suge Graphics, a digital agency specializing in web development, SEO, Google Ads, Meta Ads, graphic design, and digital marketing strategies. He holds nine professional Google certifications earned through Google Skillshop. His professional expertise and interests encompass economics, business administration, entrepreneurship, programming, artificial intelligence, web technologies, visual communication, digital marketing, and online publishing. As an author at SkillOnPage, he draws on his multidisciplinary background, professional experience, and research to produce informative articles, practical guides, and educational content across a range of subjects.
Leave a Comment

Leave a Reply

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