When it comes to resolving self-referral issues, Google touted simplified sub-domain tracking as one of the bigger improvements made by Universal Analytics (the latest version of Google Analytics). It even states at the top of Google’s documentation on the causes of self-referrals in web traffic:
If you’re using Universal Analytics, including Mobile App Analytics, it’s unlikely you’ll see many self-referrals in your reports.
But that’s not true. We’ve noticed persisting self-referral issues with Universal Analytics, and just searching around shows that many others are still having issues, too. [Tweet this]
So I spent some time diving into rabbit holes, researching analytics tracking solutions, and I found a few contradictions in the Universal Analytics documentation that might shed some light on these persisting self-referral issues. I’ll walk you through what I found:
Exhibit A: Cross Domain Tracking Documentation
First, take a look at Google’s cross domain tracking documentation here. You’ll find this toward the very top:So, it’s clear: “Tracking users across subdomains does not require any additional configuration.”
The rest of the documentation echoes this, explaining that no further configuration is necessary to implement subdomain tracking beyond adding the analytics.js snippet to all pages.
Let’s continue…
Exhibit B: Troubleshooting Self Referrals
Let’s take another look at Google’s documentation on the causes for self-referrals in web traffic. One caveat: you’ll notice at the top it says that this information applies to the Classic Analytics, not Universal Analytics.Ignore that. It’s another contradiction, because in fact analytics.js and the referral exclusion list – which they reference lower in the page – are only available with Universal Analytics. You can verify this here and here.
Moving on. On the self-referrals documentation page here (again), you’ll see the snippet below:Takeaway: You need to make sure you add all of your domains to the Referral Exclusion List, including subdomains…
So here’s our contradiction. Evidently there is further configuration necessary in order to avoid self-referrals from your own subdomains. Subdomains aren’t included by default.
Okay, that’s weird, but it’s no problem – we’ll just add all of our subdomains to the referral exclusion list and everything will be good, right?
Exhibit C: Setting Cookie Domains
Not so fast. Let’s take a look at this section on automatic cookie domain configuration.Takeaway: Since a cookie was successfully written on a higher level domain (example.co.uk), www.example.co.uk will be skipped.
What this basically states is that Universal Analytics really does solve the subdomain self-referral issue… at least as long as the ‘auto’ statement is declared. With ‘auto’ enabled, the cookie is set at the highest level domain possible, so that all sub-domains should be exempt from passing referrals by default.
So to be on the safe side, we recommend using the ‘auto’ cookie domain setting and adding subdomains to the referral exclusion list. Why? Because Google apparently recommends both in different parts of its documentation.
One last fun wrinkle – ‘auto’ doesn’t seem to be a default part of your Universal Analytics tracking code if you are implementing via tag manager. This needs to be explicitly set by the implementer:
So there you go! I hope this helps with your tracking issues. Thanks for joining me on this adventure.
If you need help sorting out Analytics for yourself or your business, get in touch with us. We’d love to help.