Cross-Domain Tracking With Google Tag Manager and Universal Analytics

The good people over at Luna Metrics have made an awesome screencast on how to properly set up cross domain tracking using Google Tag Manager and Universal Analytics. You can read the original article here.

Here is a step-by-step guide on how to correctly set it up.

Update your Analytics account

First off you need to add all the domains to the Referral Exclusion list on your Analytics account.

1. Log in to your analytics account
2. Choose the site you wish to make the changes on
3. Go to Admin area
4. Property -> Tracking Info -> Referral Exclusion List
5. Add each domain to the list that you wish to enable cross-domain tracking for.

Macros to create and set up

1. {{ua-id}}

Setup Universal Analytics ID macro in Google Tag Manager

2. {{cross-domains}}

Setup the domains macro for successful cross domain tracking
Insert every possible domain in a comma-separated string.

3. {{element url}} (unless you have a newer account where this one already exists)


Setting up your tracking script

First off, set firing rules to all pages then proceed and change to this:


If you wish to see the screencast, check it out here. They also take care of cross-domain form submits if that is something that makes your boat float.