How to Check Cross Domain Tracking
Cross domain tracking has always been difficult to get right in Google Analytics – and it still remains a challenge as Simo Ahava’s excellent post on this explains (a must read on this topic btw).
The steps to check your setup are straightforward – if you only have one consistent link, say from mysite.com to myOthersite.com defined once in a header or menu file. However, multiple dependencies crop up when cross domain links are deployed by different platforms and managed by multiple people in different parts of your organisation. Add multiple trackers into the mix (the most common setup), and it becomes a pita to get this right – even for experts!
The answer – a systematic audit to verify your setup…
Using The Verified Data Audit Tool
This post is about verifying your cross domain tracking and I use the reports available at Verified Data as my example.
Remember cross domain tracking is a technique for measuring visitors that follow links between multiple top level domains. That is, it is not used for subdomain tracking, which is essentially automatic. To implement, you must have the required access to insert tracking code on all the website domains in question.
Disclaimer: I am the founder of verified-data.com. An automated audit tool for Google Analytics that emerged following the publication of Successful Analytics. To be specific, chapter 4 of that book. Feel free to download that chapter (Assessing Your Data Quality) to understand the background to running an audit in a completely non-technical way.
Check Your Cross-Domain Tracking
The first part of the process is to scan your site to find the cross domain links, then validate your cross domain links with the following FIVE checks:
- All cross domain links are decorated.
- allowLinker is
Trueon the receiving domain(s).
- A property UA-ID matches both the sending and receiving site(s).
- If multiple trackers are deployed, a separate cookieName is used for the roll-up account (Simo’s post).
- Referral exclusions – check that a cross domain visit does not start a new session.
These checks are described in more detail below. The following screenshot is an automated version of the audit results from verified-data.com:
If the individual checks are true (green), congratulations, you have cross-domain tracking working correctly for visitors that go from
receivingSite2.com. If visitors are also expected to go in the other direction, repeat the audit checks on the receiving sites.
Note your cross domain data is rendered useless if any of your links give a false result for any of the checks. It’s why automation is an important part of getting this consistently right.
The checks in detail…
1. Check All Cross Domain Links Are Decorated
The most obvious check is for link decoration. That is, checking for the presence of a Google Analytics client ID in the cross domain link. This sharing of the client ID allows Google Analytics to treat your separate domains e.g.
receivingSite1.com, as a single combined property with
mysite.com. Identifying a decorated link on
mysite.com is easy to verify by simply clicking on the link (mouseover is not sufficient for the decoration to be activated). The resulting landing page should look like this:
If there is no
_ga parameter appended to the link, then the link is not decorated.
2. Check allowLinker is True
After clicking the decorated link, the receiving domain must have its Google Analytics
allowLinker field set to true. If set, it instructs the landing page to look for and use the linker parameter – the original client ID.
To check this on sites deploying Google Analytics via GTM, review the “Fields to set” section for all tags using cross domain tracking. The
allowLinker must be set in this section with a value of true:
3. Check Property ID Matches
A common misunderstanding of cross domain tracking is that it can be used to combine data from different properties you own/manage. In itself it can not do that. You must first ensure all the properties involved are sending data to a single “rollup” Google Analytics property. The cross domain method stitches together the same visitor when he/she moves between your properties. Otherwise you double count the same visitor and lose their attribution in the process.
For all the sites involved in cross domain tracking, check to ensure there is at least one common Google Analytics property ID. Google’s Tag Assistant Chrome plugin is an excellent way to see what tags are loading on a page:
4. Separate cookieName (Multiple Trackers)
If your sites, in my example
receivingSite2.com only use a single tracker code with the same property ID as per check #3, then you are all well and good with this check.
However, most sites with cross domain tracking usually have multiple tracking codes deployed – one for the specific property AND a second tracker ID as a roll-up property to combine all data. In such a scenario, you must use a separate cookieName for your roll up property – otherwise each tracker can overwrite the cookies of the other. See Simo’s post for the details.
Therefore inspect the cookie name that holds the client ID for the roll up property and compare it with any others set. Note the cookie values can be the same, but the cookie name must be different:
If tracker cookers are all using the default cookieName of
_ga you have a problem. Rename the one set by the roll-up tracker to e.g.
_rollupGa. If using GTM, you do this within the “Fields to set” section:
5. Check Referral Exclusions
In your roll-up property (review check #3), ensure all cross domain visits maintain a single session. That is, have their domains listed in the Referral Exclusion list:
Tip: The referral exclusion list uses CONTAINS matching. For example, if you enter example.com, then traffic from sales.example.com is also excluded – because the domain contains example.com!
However, this is not a regex match (unfortunately). So if you cross link to many country specific domains e.g. mysite.com, mysite.co.uk, mysite.ca, mysite.se etc., you will need to list all of these.
None of the setup requirements for successful cross domain tracking are particularly difficult, but there are multiple dependencies involved – which is how this usually goes wrong. The key is a systematic (i.e. automated) audit process, such as the one available in Verified Data.
Note, apart from the checks listed here to be audited, it is also important that none of your non-cross-domain tags have the allowLinker field set to true.
Side Note: One thing to be aware of with a successful set up, is how to distinguish between your different domains within your Google Analytics roll-up account. For example, a pageview on
mysite.com/myOffer will be reported in GA as
/myOffer – exactly the same as for
receivingSite1.com/myOffer. Therefore, insert the hostname into the Google Analytics page path field. For example you can achieve this with a simple GA filter.