AMP: What are Accelerated Mobile Pages? And Don’t Forget To Implement Analytics

This last month I’ve been working with a client that’s seen a noticeable decline in organic search traffic over the last year. We’ve fixed quite a few issues with the site that could impact rankings; however, I was missing one key factor in reviewing their analytics – Accelerated Mobile Pages (AMP).
What is AMP?
With responsive websites becoming the norm, the size and speed of mobile sites is greatly impacted, often slowing down the sites and providing user experiences that aren’t uniform. Google developed AMP to correct this, significantly pairing down the pages to have a similar look and feel and significantly less size; therefore, providing a similar user experience and outstanding page speed for organic search engine users. It’s a format that competes with Facebook Instant Articles and Apple News.
Sites with AMP configured are seeing three to five times the organic traffic they were seeing without the format, so I highly recommended that you integrate AMP immediately. Some people were complaining that AMP sites are displayed via Google’s URL on a mobile device, something that could negatively impact linking and sharing. Google has responded by offering a direct link to the article as well. I honestly believe the benefits far outweigh the risks.
As an example, you’ll see that this article is at:
I implemented AMP quickly on my site and many of my clients, but neglected to notice one critical issue. The AMP plugin didn’t support third-party Analytics integrations like Google Analytics. So, like my client, we were getting quite a bit of organic traffic going to our AMP pages but not seeing any of that traffic in Google Analytics. The decline we were seeing wasn’t a decline at all, it was just Google indexing and displaying our AMP pages instead. Very frustrating!
How to Implement Google Analytics with AMP
Accelerated Mobile Pages are designed for performance and speed, but they come with technical restrictions—including disallowing most custom JavaScript. To track user activity, you must use AMP’s own analytics component: <amp-analytics>
, which uses a JSON-based configuration. Below are instructions for manually adding Google Analytics 4 (GA4) to AMP pages and implementing it through popular content management systems.
Manual AMP Implementation (Custom HTML Sites)
For custom websites where you control the AMP markup directly, follow these steps to integrate GA4:
- Include the AMP Analytics Library in the
<head>
:
<script async custom-element="amp-analytics" src="https://cdn.ampproject.org/v0/amp-analytics-0.1.js"></script>
- Insert the Analytics Configuration in the
<body>
:
<amp-analytics type="gtag" data-credentials="include">
<script type="application/json">
{
"vars": {
"gtag_id": "G-XXXXXXXXXX",
"config": {
"G-XXXXXXXXXX": { "groups": "default" }
}
}
}
</script>
</amp-analytics>
- Validate using AMP Validator and check the GA4 real-time dashboard for traffic.
- Event Tracking (Optional):
Add interaction-based triggers like button clicks:
"triggers": {
"loginClick": {
"on": "click",
"selector": "#login-button",
"vars": {
"event_name": "login",
"method": "Google"
}
}
}
AMP and CMS Implementations
Most major content management systems offer either native or plugin-based AMP support, enabling site owners to implement AMP without building pages manually. WordPress provides the most robust AMP ecosystem, with both the official AMP plugin (by the AMP Project Contributors) and third-party solutions like AMPforWP, which allow for full control over analytics, design, and content rendering.
Drupal includes an AMP module that works in tandem with its templating system and analytics modules to generate valid AMP pages from selected content types. Joomla supports AMP through commercial extensions such as wbAMP and JAMP, both of which provide GA4-compatible analytics and cross-domain tracking features.
In contrast, platforms like Squarespace and Wix do not currently support AMP and offer no built-in functionality or plugins for AMP generation. For users on those platforms who require AMP for performance or SEO use cases, a workaround is to create standalone AMP landing pages outside the CMS and link to them directly from campaigns or search listings.
Final Recommendations
- Use GA4 Real-Time Reports to test immediately after setup by visiting an AMP page and monitoring live data.
- Avoid redundancy. Only one plugin or method should control analytics injection to avoid double-counting.
- Use Linkers if necessary. When AMP is served from Google cache, use AMP Linker to preserve session continuity.
- Validate with tools. Always test your AMP URLs using AMP Validator and the Google AMP Test.