The Accelerated Mobile Pages (AMP) project is an open-source web
platform that helps to improve the performance of your web content. AMP includes
built-in support for the Google tag and Google Tag Manager. This guide describes
how to set up Google Analytics for AMP pages.
Installation
The Google tag lets you install Google Analytics, Google Ads, and other
Google products on AMP pages. Google Tag Manager sets up an AMP container and
gives you the ability to create advanced configurations and deploy third-party
tags from the Tag Manager interface.
Select your platform preference from the following buttons:
Troubleshooting
Use amptagtest.appspot.com to validate your tagging setup or you can manually
ensure that the cid value is consistent across domains by doing the
following:
Make sure to clear cookies or use Incognito mode.
If cid is not found in a Google Analytics cookie, it can also be
observed in your web browser's Network tab. Search for collect request,
and the payload should contain a cid value.
Once you have passed from the Google CDN to the client website, the
cid and the gclid value should be passed via URL decoration:
[null,null,["Last updated 2024-10-09 UTC."],[[["The Accelerated Mobile Pages (AMP) project is an open-source platform designed to enhance web content performance and includes built-in support for Google Analytics integration."],["This guide provides instructions on implementing Google Analytics on AMP pages through either the Google tag for standard setup or Google Tag Manager for advanced configurations and third-party tags."],["Google Tag Manager for AMP is not compatible with Google Analytics 4, necessitating manual snippet addition for GA4 integration with AMP."],["Troubleshooting tagging issues can be done using the provided validation tool or by manually verifying consistent `cid` values across domains, ensuring proper linker functionality and redirect handling."]]],["The core content outlines setting up Google Analytics on Accelerated Mobile Pages (AMP). It details using the Google tag for Analytics and other Google products, or Google Tag Manager for advanced configurations and third-party tags, noting Tag Manager's incompatibility with Google Analytics 4. Troubleshooting involves using amptagtest.appspot.com or manually checking for consistent `cid` values across domains, ensuring `cid` and `gclid` are passed via URL decoration and are the same as initial values, while being cautious with redirects.\n"]]