How to Verify Your Cross Domain Tracking Setup

The answer – a systematic audit to verify your setup…

The Verified Data Audit Tool

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 in Google Analytics. To implement cross domain tracking, you must have the required access to insert tracking code on all the website domains in question.

This post is about verifying your cross domain tracking and I use the reports available at Verified Data as my example.

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:

  1. All cross domain links are decorated.
  2. allowLinker is True on the receiving domain(s).
  3. A property UA-ID matches both the sending and receiving site(s).
  4. If multiple trackers are deployed, a separate cookieName is used for the roll-up account (Simo’s post).
  5. 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:

Image: Cross domain audit report via Verified Data. Links audited are from mysite.com to receivingSite1.com and receivingSite2.com.

If the individual checks are true (green), congratulations, you have cross-domain tracking working correctly for visitors that go from mySite.com -> receivingSite1.com and 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

Cross domain tracking relies on link decoration – this is the hand over of cookie information from one site to the other when the visitor clicks on the cross domain link. Therefore it is the most obvious first check. That is, check 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 part of a unified visitor journey 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:

http://receivingSite1.com/landingPage?_ga=1.199239214.1624002396.1440697407

If there is no _ga parameter appended to the link, then the link is not decorated.

2. Check allowLinker is True

After your visitor clicks a decorated link, the receiving domain must know what to do with the extra information it receives. For this, the receiving site must have its Google Analytics allowLinker field set as true. If set, it instructs the landing page to look for and use the linker parameter i.e. the original client ID, rather than creating its own client ID.

To enable 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 ensure all the properties involved are sending data to a singlerollup” Google Analytics property. The cross domain method works by stitching together the same visitor ID when he/she moves between your properties. Otherwise you double count the same visitor AND lose the original attribution (campaign/referral information) of the visitor in the process. That is, the referral info for receivingSite1.com becomes mysite.com  and not campaign_X.

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 mysite.com, receivingSite1.com and 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 and you can skip this section.

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 Ahava’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:

Image: Viewing cookies set via EditThisCookie Chrome extension.

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:

Image: Use a cookie name other than _ga for your roll up tracker.

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:

Image: Add all cross domains to 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.

Summary

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.

Good luck!

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.

Looking for a keynote speaker, or wish to hire Brian…?

If you are an organisation wishing to hire me and my team, please view the Contact page. I am based in Sweden and advise organisations in Europe as well as North America.

You May Also Like…

Sayonara Universal Analytics

Sayonara Universal Analytics

My first Google Analytics data point was 15th May 2005 for UA-20024. If you are of a certain age, that may sound off...

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Share This