Loading
Back to all articles

How to Set Up Cross-Domain Tracking in Google Analytics 4

Cross-domain tracking in Google Analytics 4 enables marketers to accurately track users as they move between multiple domains, providing consistent data and a complete view of user journeys. Although not enabled by default, GA4 provides an easy setup process to ensure user activity is measured seamlessly across your owned domains.

What Is Cross-Domain Tracking in Google Analytics 4?

Correctly set up Google Analytics 4 can track visitors within a single domain and its subdomains. So, if the web page you track uses the mypage.com domain, the standard GA4 setup tracks users on this domain and its subdomains, for example:

  • blog.mypage.com
  • store.mypage.com

However, if a user goes to another domain that you control, such as mypage2.com, and you have Google Analytics 4 installed on this page as well, Analytics will count that as a separate visit. For it, this is equal to two visitors reaching mypage.com and mypage2.com separately. This situation is called ‘self-referral,’ as the visit to the second domain will be seen as a new traffic acquisition.

The outcome is inconsistent data showing overinflated visitor numbers and not reflecting the true user journey.

How Does Google Analytics 4 Track Users Across Visits and Domains?

GA4 uses cookies to store user identification data. However, cookies cannot be shared between domains. The solution to that is including a special parameter in the URL that will allow Analytics on the second domain to identify and connect the current visit to the original visit. This parameter is (_gl).

You can enable appending such a parameter in Google Analytics 4 setup with ease.

How Do You Enable Cross-Domain Tracking in GA4?

The first thing to remember is that both domains need to be tracked under the same property. Setting up cross-domain tracking for pages that are under different properties is not possible.

Once you are sure that this is taken care of, head to the Admin view in Google Analytics 4, go to Data Streams, and then to Web stream, and click it.

Then click ‘Configure tag settings.’

Click ‘Configure domains.’

Create two conditions with the ‘Match type’ set as ‘Contains’ and provide both domain names.

This is it. Cross-domain tracking is now active.

What Should You Remember About Cross-Domain Tracking in GA4?

Let’s reiterate what’s important:

  • Cross-domain tracking allows tracking users between domains.
  • Cross-domain tracking is not for tracking users moving between the main domain and its subdomains.
  • Pages on both domains need to have Google Tag Manager installed and be tracked under one data stream (the same measurement ID).

Once you understand all the points above, you can easily activate cross-domain tracking for your visitors.

Frequently Asked Questions

Question: What is cross-domain tracking in Google Analytics 4?

Cross-domain tracking is a setup in GA4 that connects user sessions across multiple domains you own, avoiding inflated visitor counts and giving you a complete view of a single user’s journey.

Question: Why is cross-domain tracking important for marketers?

Without cross-domain tracking, navigating between domains counts as new visits, leading to inaccurate user and conversion data. Proper setup ensures data consistency and correct attribution.

Question: How does Google Analytics 4 enable cross-domain tracking?

GA4 uses a special URL parameter (_gl) to pass user identification data between your domains, allowing accurate tracking without sharing cookies.

Question: What is required for cross-domain tracking setup in GA4?

Both domains must use the same GA4 property, have Google Tag Manager and analytics installed, and cross-domain configuration set in the GA4 Admin settings with domain rules.

Question: Is cross-domain tracking also needed for subdomains?

No, standard GA4 setup already tracks users between a main domain and its subdomains. Cross-domain tracking is only for tracking between separate domains you control.

Previous article Next article

You may also like

Start using Voluum with Collaboration Tools today!

×
Oops!