Analytics 6 min read
The Many Cases of How Google Analytics Records AMP’s Data
- 26 Jul 2017 8 min read
Rolled out in February 2016, Accelerated Mobile Pages (AMP) provide consistently fast experience to mobile users. Google even announced that AMP would move into organic mobile search results, making it a big step and an even bigger opportunity for business owners and digital marketers.
Since the AMP’s launch, BuiltWith reported that 88,462 live websites have been using Accelerated Mobile Pages. That was not even close to a fraction of the whole internet. The number has continuously increased as business owners and digital marketers understand the positive effects of AMP on mobile and user experience.
Digital marketers who jumped into the AMP bandwagon didn’t see the issues coming, like how AMPs are being tracked especially those who are using Google Analytics. Barb Palser summarizes these issues: overcount of users and sessions, higher bounce rate, large single-page sessions, and the list goes on. She also mentioned how the AMP content differs from standard web content in terms of how metrics are registered.
On another note, Malte Ubl, the creator and tech lead of the AMP project, is also (ahem!) well aware of these issues, noting that they’re not easy to fix. Some known web analytics experts like Simo Ahava and Dan Wilkerson wrote a solution to this problem; however, Malte mentioned it would still experience the same issues on Safari. Look at the interesting Twitter conversation below about AMP.
Being part of the Propelrr SEO unit, we’ve decided to try out the AMP for our clients despite the issues on Google Analytics. Here’s how we addressed most of the issues on data tracking.
Our AMP Test
Prior to the Google Analytics team announcement in May 2017, we’ve implemented AMP and documented our tests (Duh! As always, it’s part of our life at the Propelrr HQ) to fully understand how the data are being recorded through Google Analytics.
Our tests showed that pageviews coming from google / organic were being recorded as referrals from cdn.ampproject.org.
To get a glimpse of how many pageviews are coming from google / organic, we’ve used a separate Google Analytics view as the test view. We’ve also created a filter where we rewrite the medium of cdn.ampproject.org from referral to organic.
Here’s an example of what we did following Carlos Escalera’s tips on how to move referral traffic to its right place in Google Analytics.
Here’s a walkthrough of how we filtered our traffic sources:
Step 1: Identify the traffic sources that you want to re-write.
In our case, it’s Domain-com.cdn.amproject.org|domain.com.
Step 2: Go to your Google Analytics, click Admin tab, and select Filters.
Step 3: Click on +Add Filter and provide an appropriate name for the Filter.
Step 4: Configure the Filter.
Choose Filter Type: Custom > Advanced
Field A -> Extract A:
Include the Traffic Sources you want to re-write under (Domain-com.cdn.amproject.org|domain.com)
Field B -> Extract B
Campaign Medium: referral
Output To -> Constructor: organic
Step 5: Tick the boxes for:
Field A Required
Field B Required
Override Output Field
Then click Save. See image below for your reference.
The May 2017 Google Analytics Enhancements
Google announced in May 2017 that it would roll out an enhancement to give users an accurate understanding of how their visitors are engaging to their specific businesses, traversing from AMP to non-AMP pages of each website. We’ve tested our cases again to verify if there’s any improvement. Here are the results:
This is how Google Analytics records the before and after of the said enhancements.
|Cases||Result Before||Result Now|
|Google Mobile Search > AMP||google / organic||google / organic|
|Google Mobile Search > AMP > AMP||www-yourdomain-com.cdn.amproject.org / referral||www-yourdomain-com.cdn.ampproject.org / referral|
|Google Mobile Search > AMP > Non-AMP||(direct) / (none)||www-yourdomain-com.cdn.ampproject.org / referral|
|Google Mobile Search > AMP > AMP > non-AMP||(direct) / (none)||www-yourdomain-com.cdn.ampproject.org / referral|
|Google Mobile Search> AMP > AMP > non-AMP > non-AMP||(direct) / (none)||www-yourdomain-com.cdn.ampproject.org / referral|
|Google Mobile Search > AMP > AMP > non-AMP > non-AMP > non-AMP||(direct) / (none)||www-yourdomain-com.cdn.ampproject.org / referral|
|Google Mobile Search > AMP > AMP > non-AMP > non-AMP > non-AMP > non-AMP||(direct) / (none)||www-yourdomain-com.cdn.ampproject.org / referral|
|Direct Access AMP Homepage > AMP||yourdomain.com / referral||yourdomain.com / referral|
|Google Mobile Search > AMP Homepage > AMP||yourdomain.com / referral||www-yourdomain-com.cdn.ampproject.org / referral|
|Google Mobile Search > AMP Onsite Search||(google) / (organic)||(google) / (organic)|
|Google Mobile Search > AMP Onsite Search > AMP > AMP||yourdomain.com / referral||yourdomain.com / referral|
|Direct Access AMP Homepage||(direct) / (none)||(direct) / (none)|
|Direct Access AMP Homepage > AMP Onsite Search||yourdomain.com / referral||www-yourdomain-com.cdn.ampproject.org / referral|
|Direct Access AMP Homepage > AMP Onsite Search > AMP||yourdomain.com / referral||yourdomain.com / referral|
|Direct Access AMP Homepage > AMP||yourdomain.com / referral||yourdomain.com / referral|
Here are the results of our tests:
1. AMP still inflates referral traffic
When a user discovers an AMP-enabled page from Google carousel or the mobile search results and clicks to another AMP page or an internal link to another AMP-enabled page, this activity records the Source / Medium as www-yourdomain-com.cdn.ampproject.org / referral.
Google Mobile Search > AMP > AMP page = www-yourdomain-com.cdn.amproject.org / referral
While for other cases, like accessing the AMP homepage directly and clicking to AMP-enabled article page, this activity records the Source / Medium as www-yourdomain-com / referral.
Direct Access AMP Home Page > AMP = yourdomain.com / referral
AMPs are cached and served using a third-party domain, which is cdn.ampproject.org.
The client ID cookie is not transferred when a user visits another AMP-enabled page, thus treating the source as a referral.
2. Direct traffic becomes referral traffic
Google Mobile Search > AMP > non-AMP page = (direct) / (none)
Previously, the data was similar to referral traffic. When a user clicked an internal link from an AMP-enabled page to a non-AMP, the activity recorded the Source / Medium as (direct / (none).
Google Analytics now records it as a referral from cdn.ampproject.org.
Google Mobile Search > AMP > non-AMP page = www-yourdomain-com.cdn.ampproject.org / referral
Similar to the reason stated in number 1, AMP serves a different domain from regular page. When a user visits a regular page coming from an AMP, this causes Google Analytics to see that page as a referral link.
3. AMP overcounts unique visitors, increases bounce rate
Google Mobile Search > AMP > non-AMP = Two Unique Visits
When a user visits an AMP and clicks on an internal non-AMP link, it will be counted as two unique visits.
Google Analytics should identify whether the visit is by a new or recurring user, based on the client ID generated and stored in the (_ga) cookie. However, since the content under AMPs is served through Google’s AMP Cache via cdn.ampproject.org, it resulted in duplication of unique visitors. The client ID cookie between the AMP and non-AMP was stored differently.
Christian Oliveira provided several cases that show several scenarios, four of which generate a different client ID. This means that one unique visitor can now be counted as four unique visitors at the most.
If this is the case, when a session is divided into two sessions, the first session is counted as only one pageview. And if the second session only visits another one page, it will be counted as a bounce rate. The continuity of a single session will now split into two sessions, thus the increase in bounce rate.
4. Sessions and pages / session
AMP has two major effects when it comes to sessions: it overcounts sessions and undercounts pageviews per session.
Due to the reason stated in number 3, it shows that instead of having two pageviews in one session, we’re now getting one pageview per session.
The solution for number 1 is filtering the referral traffic to its rightful place in Google Analytics, based on the result of our cases. The second issue is no longer a problem since all direct traffic is now being recorded as referral traffic, which is being filtered. The Google Analytics team is certainly up to provide more accurate data for its users. Based on our previous cases vs. our most recent one, there is indeed an update. Isn’t it exciting that in a few months, we may see a huge update coming up?
Furthermore, the solution for issues stated in numbers 3 and 4 will greatly rely on the AMP tracking support that Google is currently working on. According to Google, we might experience the following during the enhancement:
- Decrease in user and session counts once distinct IDs are counted as the same user
- Temporary rise in new users as IDs are reset
- Consistent rise in pageviews per session and bounce rate until all the past users who viewed AMPs are unified
Google said these enhancements might take a short or long time and that we didn’t have to do anything because changes would be automatically rolled out.
We’ve checked our personal data to see any prominent movements based on the enhancements that Google is currently doing. This is what we have:
Based on our data, the number of sessions in June is less than in May before the enhancement, and the behavior metrics don’t seem to have a significant change at all.
All the articles we read about AMP discuss on-point experiences from the way Google Analytics reads AMP data to provide possible ways to segment them properly. It’s true that there are issues when implementing AMP to your websites, but like any other “new” update, there will always be room for improvement as this case shows. Google Analytics is continually making enhancements to accurately read your current and past data with AMP.
Do you need to implement AMP? It depends on various factors, but it all boils down to your goal. What do you want to achieve for your business? Go ahead if your answer is any of the following:
- Speed up your website load time
- Improve your website’s user experience
- Improve your search engine ranking or search visibility
- Improve server performance
- Be ready on the mobile first indexing
Especially now that enhancements for Google Analytics are ongoing, the result will definitely be sweet! Why sweet? Well, we should know since we’ve been reaping the many positive results of AMP.
So, we advise you to take AMP for a spin, or you can get in touch with us if you need help.