The tag ‘amp-ad extension .js script’ is missing
When implementing AMP pages, and getting the error the tag ‘amp-ad extension .js script’ is missing or incorrect, but required by ‘amp-ad’. This will soon be an error, in Google Search Console with Google AMP ads or over advertisement network, it simply means that a specific AMP script for ads has been forgotten in the web page.
<script async custom-element="amp-ad" src="https://cdn.ampproject.org/v0/amp-ad-0.1.js"></script>
Include it and the error will be gone. How to fix ‘amp-ad extension.js script missing’ error?
What is accelerated mobile pages
What does AMP mean on Google? The accelerated mobile pages, also called AMP, are a new standard for mobile browsing. An AMP version of a web page is cached by Google or another search engine, is a cached version is delivered to the client.
The display is much faster, as accelerated mobiles pages AMP must observe very strict development rules, use common libraries, and do not include many things that are usually slowing down pages loading, such as extra script, external frames, or large images.
How to test AMP pages
One of the easiest way to test AMP pages, is to use the Google Search Console URL inspection and AMP testing tool.
This tool will test AMP pages, and send back any issue with the page, such as the tag ‘amp-ad extension .js script’ is missing or incorrect, but required by ‘amp-ad’. This will soon be an error.
It will generally offer links to AMP documentation, in order to find how to solve the issue and make the website AMP ready for display in Google search network and other search engines that are able to handle AMP pages.
Accelerated mobile pages WordPress
To enable accelerated mobile pages AMP on WordPress, simply install the official WordPress AMP plugin, from the WordPress plugin installation directory, or from the WordPress website.
How to add AdSense to WordPress
There are several ways to add AdSense to WordPress website, either by adding the code manually in the head section of the HTML output code, or by using a plugin that will do it for you.
Another solution, is to use an external advertisement service, such as Ezoic, that will manage the ads for you, and render your website to your visitors. All you have to do, is to register to Ezoic advertisement network, which includes AdSense and other ads networks, and setup your website to be served by their DNS, and it will automatically display the ads for you.
WordPress AMP AdSense
The WordPress AMP AdSense code is different than the standard AdSense for WordPress. Make sure to include the necessary scripts for your WordPress AMP versions corresponding to the accelerated mobile pages AMP AdSense advertisement standards.
It requires several changes in the whole website source code. An easiest way to display ads on an accelerated mobile pages AMP WordPress site, is to use an external advertisement mediation network, such as Ezoic, that will manage the whole advertisement part for your site. All you have to do, is to enable AMP for your WordPress site, register on their ad network, and let them manage the advertisement for you.