[Skip to Content]
Aug 11, 2020

Google Analytics: Cross-Domain Tracking. You Can Do This.

The one thing you must do to evaluate your fans’ path to purchase.

Welcome to the second installment about setting up and using Google Analytics. If you missed post number one, check it out here. This time around, we're tackling a source of anxiety for many users, cross-domain tracking.

I can’t stress it enough: you can do this. Whatever you’ve thought before about this topic, no matter how perplexing it may seem, I promise you can do this. Feeling good? Deep breath. Here we go.

But Why?

Setting up cross-domain tracking is essential to proper eCommerce measurement and attribution if your eCommerce platform and your content site are on different domains. Without cross-domain tracking in place, when the user moves from your content site to eVenue, a new session is created, erasing any attribution for how the user came to your content site. This prevents you from evaluating your content's influence on sales as well as marketing efforts driving traffic to bring that user to your site. The new session created skews many core performance metrics such as bounce and conversion rates as well as user and session counts. Without good data, how can you expect to make informed decisions?

Identifying the Need

If you found yourself asking, “Wait, are my content site and eCommerce site on different domains?” We'll use the Spokane Chiefs of the Western Hockey League as an example. The content site domain is spokanechiefs.com, but when the user gets to eVenue, the domain is now evenue.net. Subdomains, the portion before evenue.net, do not factor into cross-domain tracking. If your site has this same setup, you need to use cross-domain tracking.



If your eCommerce site happens to be on a subdomain of your main site, such as the Spokane Chiefs' merchandising site, shop.spokanechiefs.com, cross-domain tracking is not needed because the domain, spokaneschiefs.com, is the same on both sites.


Making the Change

If you don't know code and don't have access to your site's code, don't worry. To make the change, you will probably need to request the changes from your Paciolan EOS and your content site provider.

Update Your eVenue Site
Contact your Paciolan EOS and request to have Google Analytics cross-domain tracking implemented. When doing so, provide your EOS with: 

  • Your property ID (found under property settings in the middle section of the Google Analytics admin panel) 
  • The cross-domain value used for the setup. This should be: 'yourcontentsite.com,evenue.net' where yourcontentsite.com should be replaced with, well, your content site's address.

Request Cross-Domain Tracking from Your Content Site Provider
Content site providers may implement Google Analytics tracking in different ways, but the core setup should be the same. The following elements should get the job done.  

  • Ask for GA to allow the linker plugin.
  • Ask for the linker plugin to be required.
  • Ask for the autoLink domains to be set to 'yourcontentsite.com,evenue.net'
    • Again, replace yourcontentsite.com with your content site's address.

That should be it. To avoid confusion, skip the next section 'Implement your own Google Analytics code'.


Implement Your Own Google Analytics Code

If you use Google Tag Manager to implement Google Analytics or can manage and edit the Google Analytics script on your content site, you can add the following pieces of code to the script to implement cross-domain tracking.

Using Universal Analytics

  • Add “{‘allowLinker’ : true}” to the end of the ga(‘create’, ‘UA-XXXXX-X’ … line. The final product should follow this format : 
    • ga('create', 'UA-XXXXX-X', 'auto', {'allowLinker': true}); 
  • Add the lines below immediately after the previous line.
    • ga('require', 'linker');
    • ga('linker:autoLink', ["yourcontentsite.com,evenue.net"]);
  • The complete code should look similar to this.
<script type="text/javascript">

/****** Google Universal Analytics for eVenue ******/

(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
 ga('create', 'UA-XXXXX-X', 'auto', {'allowLinker': true});//INSERT PRIMARY ACCOUNT NUMBER HERE
ga('require', 'linker');
ga('linker:autoLink', ["yourcontentsite.com,evenue.net"]);
ga('send', 'pageview');

/****** End Google Universal Analytics for eVenue ******/


Using Global Site Tag

  • Update the analytics configuration with {‘linker’ : { ‘domains’ : [‘yourcontentsite.com,evenue.net’]
  • The final code should like the code below.
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-XXXXX-X"></script>

  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  gtag('config', 'UA-XXXXX-X',
{'linker': {
'domains': ['yourcontentsite.com’,’evenue.net']



Using Google Tag Manager

  • Create a new 'constant' variable named gaCrossDomains, set the value to yourcontentsite.com,evenue.net


  • In your gaProperty Google Analytics Settings variable:
    • In the Cross-Domain Tracking section, use your gaCrossDomains value as the Auto Link Domains
    • Under fields to set add a line with Field Name: allowLinker and set the value to true


  • Use this gaProperty Variable in your Google Analytics tracking tag.


  • Save your tag and publish the container when you are ready.


Time to Exhale, the Hard Part Is Done

Hopefully, requesting or updating your tracking wasn't too bad. Now that it is done, there is one more oft-forgotten step to complete the setup.

Go to the Admin panel in Google Analytics, in the property (middle) column, go to the "Referral Exclusion List." Here, you need to add each domain listed in your cross-domain setup, so they are not counted as referrals.



Don't Forget to Test

Testing your cross-domain setup should be easy, but if it doesn't immediately work, it can be quite frustrating. I recommend you test through one of two methods.

OPTION 1: Use Google Analytics’ Real-Time Reporting

  1. Open a new browser and begin typing your website address.
    • Before loading the site, add campaign tracking tags to your domain to isolate your traffic. I recommend something super creative like yourcontentsite.com/?utm_source=test&utm_medium=test&utm_campaign=test
    • Once that’s added, reload the page.
  2. Now go to Google Analytics in a different browser window or tab and open the Realtime Traffic Sources report.
    • Here you should see your “test” source and medium.
    • Click on either the source or medium to isolate your session as you go through the next steps.
    • cdtRealTime1.jpg
  3. Now go to the Realtime Content report. The page listed should be your homepage, the page your other browser is on.
  4. Go back to the browser with your site open and click a link going to eVenue.
    • It may take a few moments, but you should see the active page in the content report update to your eVenue page. If not, cross-domain tracking is likely not set up correctly.
    • The first step in troubleshooting is to reach out to your EOS who can guide through any necessary follow up steps.
    • cdtRealTime2.jpg



OPTION 2: Install and Use the Google Tag Assistant Browser Extension

  1. Before loading your home page, open the extension.
    • Click the enable and record buttons.
    • Be sure to tick the box to “follow recording links across tabs”
    • ga-pt2-10.png ga-pt2-11.png
  2. Now load your site and navigate from your content site to evenue.
  3. Once the eVenue page has loaded, click the extension, stop recording, and click the option to view recordings.
  4. Switch from the Tag Assistant Report to the Google Analytics Report.
    • Choose the property and view you are using.
    • cdtGTA1.jpg
  5. Once the report loads, you should not see any warnings or errors.
    • If there are warnings saying “this hit starts a new session…” cross-domain tracking is likely broken.
    • Contacting your EOS is the best first step to troubleshooting.

Arenas and Performing Arts Centers with Residents

If you have multiple Google Analytics properties on your eCommerce site with different content sites, setting up cross-domain tracking can be trickier. The implementation on each content site should be the same, but you will want to consult with your EOS to implement tracking correctly on eVenue. Venues with tenant teams/organizations and colleges with a CTO model are the most common scenarios for this setup. But once again, don't worry. With rare exceptions, we can accommodate your needs!

And that's it! Not so bad, right?

With cross-domain tracking in place, you can now better understand your consumer's path to purchase, how your content may influence sales, and confidently measure marketing efforts driving traffic to your site.


The Google Analytics Series:

authorPost by Mark Baker, Digital Marketing Specialist, Paciolan