What is Cross-domain Tracking?

Cross-domain tracking is a tricky concept.

In cross-domain tracking, we share cookie information between two or more domains. The domain can be a primary domain or subdomain. The cookie information that we pass from one domain to another is the client ID. This client ID is stored in the Google Analytics cookie _ga.

Cross-domain measurement makes it possible for Analytics to see sessions on two related sites (such as an eCommerce site and a separate shopping cart site) as a single session.

Standard Analytics Tracking

The standard Analytics tag records traffic to a given URL as a single unit. For example, if you set up Analytics on your blog or on your website, traffic to all pages and subdirectories to your site is collected and tallied as a unit. If a user lands on your landing page and hops around different pages of your website, Google Analytics will record the users’ activities on your website as a data for that website.

Cross-Domain Measurement

But sometimes it may happen that you have an online store and a 3rd-party shopping cart hosted on another domain. Without cross-domain measurement, a user who arrives at your online store and then proceeds to your 3rd-party shopping cart is counted as two separate users, with two separate sessions of different durations.

But if Cross-domain tracking is implemented in Google Analytics it is possible to view to see this as a single session by a single user. A user to your online store who proceeds to your shopping cart is counted as one user, instead of two users, and the session they started on the store site is continued through to the time spent on the shopping cart site.

Why Cross-Domain Tracking Needed?

Without a cross-domain tracking setup, you won’t be able to track and understand a user’s journey which spans across multiple domains. If a user landed on your page through a Google search and did not make a purchase then, but later purchased from another web page that has the shopping cart and order confirmation it will be counted as separate sessions in the absence of cross-domain tracking. This will give all credit to the domain where the purchase was made for all the conversions disregarding users’ journeys on the previous web page thus giving flawed data for interpretation.
Without a cross-domain tracking setup, you may have a hard time determining the original source of your goal conversion and/or e-commerce transactions. Moreover, most of the conversions would end up being attributed to direct traffic or to the wrong website.

When is Cross-domain tracking Needed?

Cross-domain tracking is needed when Google Analytics sessions span across two or more domains or subdomains and you want to treat Google Analytics sessions across domains as a single session.

Google Analytics sessions span across multiple domains when

  1. Your checkout process occurs on a different domain (which is quite common when you are using a third-party shopping cart like Shopify)
  2. Your goal conversion or e-commerce transaction takes place on a different domain ( which is also quite common in case of affiliate websites)

Before you can equip cross-domain tracking to your web pages in a funnel, there are certain things to ascertain.

  1. You need to make sure that all domains are adding the collected data to a single analytics property inside GA for your cross-domain tracking.
  2. Include the domains that are traffic sources in your cross-domain traffic to Referral Exclusion List inside Google Analytics
  3. When entering the target domain via a link in the source domain, make sure that the URL has ‘_ga=1.234567.234567.234567’ URL parameter query in place.
  4. All Google Analytics trackers or tags firing on the target domain should have the AllowLinker field to be set to true.

Collecting all data to the same Analytics Property

A property in Google Analytics is a tracking configuration inside GA that collects data from your website or other digital applications. Each Analytics property is identified with a unique identity known as the Tracking ID:

Google Analytics Tracking ID

This tracking ID is unique for each property and whilst you are dealing with cross-domain tracking, you have to use the same Analytics Property for all the domains in the funnel for cross-domain tracking.

There is no such thing as cross-property cross-domain tracking. Anything anywhere near to that would be a Roll-up reporting feature from Google Analytics premium if you want to work with domains from different Analytics properties.

Domains in Referral Exclusion List

When you visit a website from a certain referral, you are added to Google Analytics as a session due to the detection of a new traffic source. Visiting sourceDomain.com from an organic search and then going to targetDomain.com will count sourceDomain.com/referral as an origin towards the targetDomain.com
By using the Referral Exclusion option, you are asking google to treat every hit as a direct hit and not as a referral from the Source Domain. So, Referral exclusion keeps the session alive and all the hits in the session from source Domain to target Domain are counted in the same session. That is what you need for cross-domain tracking.

Linker Parameter in the URL

The linker parameter or plugin allows you to retain the signature for the cookie or the Traffic ID for two minutes. In this manner, if the user jumps from one domain to another, the URL containing the query parameter for the linker will retain the signature and keep cross-domain tracking possible and probable.

The reason that there is a two-minute interval for the query is that without it, there can be a horrible mess. With a link containing the query without the time limitation parameter, every identity will be the same and there would be no distinction whatsoever.

You can use the Linker plugin with the autolink facility provided by Google Analytics. It adds the URL query parameter to all specified domains in your funnel for cross-domain tracking. It can be verified with the visibility of _ga=1.234567.234567.234567 in your URL. If that doesn’t show, the autolink did not run properly.

allowLinkers in the target domain

With everything else in place, you need to now make sure that the target domain respects the URL query parameter in the domains. You can enable this by adding a new field inside GTM for allowLinker and set the metric to be true for the firing of the trigger.


With these four things sorted out, cross-domain tracking should work perfectly for your domains on Google Analytics. Make sure all the steps are properly configured in GTM for the triggers to fire properly.