What is AMP?
It was originally created by Google as a competitor to Facebook Instant Articles and Apple News. AMP is optimized for mobile web browsing and intended to help webpages load faster. AMP pages may be cached by a CDN, such as Microsoft Bing or Cloudflare's AMP caches, which allows pages to be served more quickly. Read more about AMP here.
Example: There is a duplicate version of every article page that lies in the page source code and when the user enters through mobile the AMP version is served.
https://www.yourdomain.ro/articles/some-article-titleamp version: https://www.yourdomain.ro/amp/articles/some-article-title
Tracking for AMP pages.
- Google Tag Manager
Create a new GTM container. You have to choose the AMP version.
Install GTM following the instructions:
Issue found: you can’t use the regular GTM preview mode and Tag Assistant.Solution: Publish your container and check the implementations in the Network requests.
2. Google Analytics
You can use the same GA Property since the AMP pages are part of the same site.
You can acquire traffic on your website through the AMP pages but then the user can navigate to a non-AMP page and make a conversion.
Issue found: Navigating from an AMP page to a non-AMP page breaks the sessions. So you will have 2 sessions instead of 1.
Solution: Set up Google Analytics session unification for AMP.
Documentation here. Use ‘Option 2’ with GTM.
3. Google Search Console
Check if your AMP page is valid here : https://search.google.com/test/amp
Issue found: You have to verify your domain for GSC (here are the ways you can do it).
If you do this with GTM, you have to create a new GSC Property.
Our issue was that the AMP pages were not domain verified so you could not see the activity in GSC for them.
To track everything in GSC , set it on the direct domain, and not only on a property. On the domain all the data from all the properties are cumulated: www, non www, http, https ... subdomains
Traffic on AMP is recorded as direct in some cases. From our tests we discovered that it happens when the user enters from "discovery" (enters the site from a mobile search, directly from the quicksearch widget).From several researches, we found out that it is a known problem from Google (some examples: example 1, example 2).
(real time test with google organic search)
Set a custom dimension that takes the value of the referral, through GTM.
* We have been confirmed that the traffic coming from the Android Search Application is registered as direct.
Then, apply an Analytics filter that replaces the source of the traffic coming from this application, when the source is registered as direct and overwrites it. The same goes for the medium: from 'none' to 'organic'.
Now, we can see in the reports, the correctly registered traffic.
Soultion2 (not tested – Thanks, Paul Chris Luke, for the advice :) The cloudflare enterprise system: https://blog.cloudflare.com/announcing-amp-real-url/.
Basically, completely remove the AMP URL and then you can use your own domain, so that the typical tracking can work. From what I understand, this is a very expensive solution.
You can write feedback/problems on https://github.com/ampproject.