Do I Need Cross-Domain Tracking?


Cross-domain tracking is one of the more complex, confusing and often misunderstood areas of web analytics. It involves cookies, browser security settings, and an understanding of your overall measurement strategy.

I hope to simplify some of this for you with a simple flowchart, that will tell you whether or not you need cross-domain tracking to begin with. This is the first question that frequently stumps web analysts.

But before you dive into the flowchart, let’s get some things straight:

Let’s Define domain and subdomain

We’ll be defining domain and subdomain for the purposes of cross-domain tracking in Google Analytics. As such, this is a simplistic explanation of the distinctions, and doesn’t fully examine the subtle differences. If you’d like to learn more, the Wikipedia entry for Domain name is rather extensive.

The domain (also called the root domain) is the part of the website address immediately before the .com (or .net, .edu, .org, etc.). For example:

Full Website URL:

The Domain Is: example

The subdomain is the part between the http:// and the first dot (.). In our example, www is the subdomain, but consider the following examples:

Full Website URL:

Full Website URL:

Full Website URL:

The Subdomains Are: video, blog, and shop, respectively.

Bonus: For extra credit, the part at the end – com, org, edu, etc. – is called the top level domain, or TLD. This is important because from the perspective of cross-domain tracking, and are considered two separate domains.

Do I Need Cross-Domain Tracking?

We use cross-domain tracking with Google Analytics to track multiple websites into one property and to make sure that one user that travels between multiple sites is tracked as a single user. Generally this means that even though there are multiple domains, they serve the same audience and appear to the user as if they’re the same site.

Sometimes, cross-domain tracking is not necessary. Take a look this flowchart:

Cross-Domain Tracking Flowchart

If you followed the chart and determined that cross-domain tracking is necessary, then we’ve got a great setup guide for Google Tag Manager. You’ll need to be able to make changes to your website code or through Google Tag Manager, and you’ll need to follow several steps, which we’ve outlined for you.

What About Subdomains?

Cross-domain tracking only applies if you have multiple domains. If you have a single domain with multiple subdomains, cross-domain tracking is not necessary!

If you have two or more subdomains that you’re tracking into the same Property in Google Analytics, the default tracking code for that Google gives you to put on your site is already set up to automatically work across your subdomains.

Google Analytics Tracking Code

This wasn’t always the case. With the older versions of the Google Analytics tracking code (anything before Universal Analytics and the analytics.js library), you had to modify your tracking code to explicitly tell Google Analytics to set the cookie at the root domain level. That way, all of your subdomains would be able to read and write to the same cookie. Now, that happens automatically.

There are two easy steps for cross-subdomain tracking, 1) Set the Cookie Domain and 2) Update Your Referral Exclusion List. For more information, check out our guide here:

Jim Gianoglio is a Manager for the Analytics & Insight department. He works with implementation, analysis and training of Google Analytics and Google Tag Manager. Before focusing on analytics, he led the SEO campaigns of Fortune 500 companies in the insurance, retail and CPG industries. Things you didn’t know about Jim: he’s biked from Pittsburgh to Washington DC in 41 hours, roasts coffee beans and has done voiceovers for TV commercials.

  • Great article! Does cross-domain tracking with a single domain and multiple subdomains works automatically as well, when you implement Google Analytics through Google Tag Manager?

  • Cecio82

    It depends on how you configure GA instructions via GTM, not on GTM itself.

    GA automatically handles cross domain tracking between subdomains belonging to the same primary domains (let’s say:, and, if you properly set cookie domain to “” (or ‘auto’).

  • Jim Gianoglio

    Cecio82 is on the spot! In GTM, you just need to make sure you have ‘cookieDomain’ set to ‘auto’ under the Field to Set section.

    Unfortunately, this is not automatically enabled in GTM, even though it’s the default setting in GA.

  • Rocknoxious


    Great article. Thank you.

    I’m understand how subdomain tracking and domain tracking are different, however our site is already set up (with GTM an Universal GA) to track our subdomains via cross domain tracking. So, my dilema is do I NEED to fix it, and if I do fix it, aside from referrals being more accurate, does anything else really change?


    • Jim Gianoglio

      If you’ve already set up cross-domain tracking for your subdomains, this doesn’t necessarily break anything or change anything. It’s just unnecessary (and a little annoying to see the client ID being passed as a query parameter every time you go back and forth between the subdomains).

      But, there’s technically nothing that you would need to “fix.”

Contact Us.

Follow Us



We'll get back to you
in ONE business day.
Our Locations
THE FOUNDRY [map] LunaMetrics

24 S. 18th Street
Suite 100

Pittsburgh, PA 15203


4115 N. Ravenswood
Suite 101
Chicago, IL 60613


2100 Manchester Rd.
Building C, Suite 1750
Wheaton, IL 60187