amp

My life with AMP…..

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

amp-code

Tracking for AMP pages.

GTM

1. Google Tag Manager

Create a new GTM container. You have to choose the AMP version.

create-container-gtm

will notice that the AMP container version doesn’t have the Custom HTML Tag or Custom JavaScript Variables.

 

Install GTM following the instructions:

gtm-installing-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.

gmt-issues-found

gtm-issues-2

2. Google Analytics

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.

Set up Google Analytics

3. Google Search Console

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.

Solution:

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

Reporting:

Issue found:

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).

traffic-on-amp

(real time test with google organic search)

Soultion:

Set a custom dimension that takes the value of the referral, through GTM.

google-analytics-custom-dimensions

* 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’.

google-analytics-filter

Now, we can see in the reports, the correctly registered traffic.

analytics-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.

analytics-support