Analytics: How to Enable Cross-Domain Tracking in Google Analytics

Enabling cross-domain tracking in Google Analytics allows sessions to continue across properties for tracking purposes.

For example, with cross-domain tracking in place, if a visitor loads your homepage and then follows a link to your news page on a different subdomain, they are treated as a single visitor, consuming multiple pages in a single session. 

If your tracking is handled by the SAS tag, follow the instructions below to include a domain in your cross-domain tracking settings:

  1. Sign in to Google Analytics
  2. Click on Admin
  3. Go to Account>>Property and choose the relevant property
  4. Under the Property column choose tracking info

  5. In the Tracking Info drop down menu choose Referral Exclusions List


  7. Enter the domain of the site you wish to include in cross-domain tracking.
  8. Click Create to save
To Remove a Referral Exclusion:
  1. Follow steps 1-5 from above
  2. In the table, click remove in the row of the domain you want to remove.
  3. Click Delete Domain to save

If SAS does not handle tags for your station, setting up cross-domain tracking involves editing the tracking code snippet. First, you must edit the tracking code for your primary domain:
  1. Find the create line in the snippet. For a website called, with tracking ID UA-XXXXXXX-Y, it looks like this:

  2. Make the following changes, where example-2 is your secondary domain name (changes are in red).

For example, if you were WBEZ and trying to enable cross tracking with your donation site, your code would look like this:

ga('create', 'UA-XXXXXXX-Y', 'auto', {'allowLinker':true});
ga('require', 'linker');
ga('linker:autoLink',  ['']);

In this example, UA-XXXXXX-Y is the tracking ID.

For linking multiple domains, amend the autoLink plugin like so:

More information: Google's documentation on cross-domain tracking

Did you find this article helpful?