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.









