Set up Cross-domain Tracking

See how to set up cross-domain tracking for your multiple websites to achieve the most proper data.

Cross-domain tracking allows users with multiple websites to manage all their websites’ data on a single Google Analytics 4 property.

Multiple websites mean that all websites each have their own domains. So, if you have multiple sub-domains in a single domain, you don’t need to set up cross-domain tracking, because Google can recognize these sub-domains.

  • Sub-domains: blog.myshopifywebsite.com, awards.myshopifywebsite.com
  • Different domains: myshopifystore.com, myshopifywebsite.com

What are the benefits of cross-domain tracking?

The most beneficial feature of cross-domain tracking is that the customers navigating between your websites have one-single Google identifier (aka. Client Id (cid)).

  • The Client ID (cid) is a unique identifier for a browser–device pair that helps Google Analytics to link user actions on a site.

Because the customers have a single Client ID for multiple websites, implementing cross-domain tracking will allow you to get more accurate results in analyses based on the number of users.

  • For example: A customer who purchases one of your products from Website1 will be counted as the same user if they will purchase another product from Website2.

How does cross-domain tracking work?

For cross-domain tracking to work, your customers should navigate from Website1 to Website2 via a link or a button to be able to transfer their Client ID to the second website. Once the customers navigate to the second website, Google Analytics stores their Client ID until the cookie expires or the user clears the cookies. This way, the user will continue to be counted as a single user as long as they continue to visit both websites.

How does cross-domain tracking work?
How does cross-domain tracking work?

What is needed for cross-domain tracking?

Not much! To implement cross-domain tracking on your websites, you’ll only need:

  1. A link that will redirect users to other websites without leaving your website,
  2. A Google Analytics account,
  3. Integration between Google Analytics 4 and both websites.

Note: We will use Google Tag Manager as the integration method. So if you don’t have a Google Tag Manager account yet, you can refer to our open-source GA4 Kit first and complete the setup process for each website.

How to set up cross-domain tracking?

Here are the steps to set up cross-domain tracking in Google Analytics.

Table Of Contents