Stay organized with collections
Save and categorize content based on your preferences.
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:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-09 UTC."],[[["\u003cp\u003eThe 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.\u003c/p\u003e\n"],["\u003cp\u003eThis 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.\u003c/p\u003e\n"],["\u003cp\u003eGoogle Tag Manager for AMP is not compatible with Google Analytics 4, necessitating manual snippet addition for GA4 integration with AMP.\u003c/p\u003e\n"],["\u003cp\u003eTroubleshooting tagging issues can be done using the provided validation tool or by manually verifying consistent \u003ccode\u003ecid\u003c/code\u003e values across domains, ensuring proper linker functionality and redirect handling.\u003c/p\u003e\n"]]],["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"],null,["# Tag setup for AMP\n\nThe [Accelerated Mobile Pages](https://www.ampproject.org/) (AMP) project is an open-source web\nplatform that helps to improve the performance of your web content. AMP includes\nbuilt-in support for the Google tag and Google Tag Manager. This guide describes\nhow to set up Google Analytics for AMP pages.\n\nInstallation\n------------\n\nThe Google tag lets you install Google Analytics, Google Ads, and other\nGoogle products on AMP pages. Google Tag Manager sets up an AMP container and\ngives you the ability to create advanced configurations and deploy third-party\ntags from the Tag Manager interface.\n| **Important:** Google Tag Manager for AMP doesn't support Google Analytics 4. If you wish to use AMP with Google Analytics 4 you must [manually add](/tag-platform/gtagjs/amp?technology=gtagjs) the AMP snippet.\n\nSelect your platform preference from the following buttons:\n\nGoogle tag Tag Manager\n\nTroubleshooting\n---------------\n\nUse [amptagtest.appspot.com](https://amptagtest.appspot.com/) to validate your tagging setup or you can manually\nensure that the `cid` value is consistent across domains by doing the\nfollowing:\n\n- Make sure to clear cookies or use Incognito mode.\n- 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.\n- Once you have passed from the Google CDN to the client website, the\n `cid` and the `gclid` value should be passed via URL decoration:\n\n **_Linker format: mydomain.com?\\_gl=1\\*1ie2jr6\\*\\_ga\\*WHFTa3JPckw2TGxZSzY5b3V1cVNVSmRIREI.\\*gclid\\*dGVzdA.._**\n\n- The final landing page should still have the same `cid` value as in the\n initial landing page.\n\n- Be careful with redirects and domain changes between the canonical page\n and non-AMP landing pages."]]