Losing Data Across Multiple Domains ?
Here’s How Cross-Domain Tracking Solves the Problem
Learn how to track users seamlessly across multiple domains, improve attribution accuracy, and get a true picture of the customer journey.

Google Analytics ⑊ Cross Domain Tracking

- Post by : Absarjoy
- 12:10 am
- August 17, 2025
What is Cross-Domain Tracking?
In Google Analytics, cross-domain tracking refers to the process of monitoring user activity across two or more domains and treating it as a single continuous session.
For example: if an eCommerce website uses a separate domain for its shopping cart, cross-domain tracking ensures the user’s journey is seen as one session instead of two. This process is also known as site linkage.In simple terms, cross-domain tracking consolidates a user’s interactions across multiple domains into one seamless session.
Why is Cross-Domain Tracking Important?
Cross-domain tracking is critical for accurately evaluating user journeys that span multiple domains. Its benefits include:
Comprehensive User Journey Analysis
Provides a complete view of how users move between domains, giving a true picture of their full journey.Better Marketing Insights
Helps digital marketers measure traffic, engagement, and performance across all domains. This is especially useful for:Businesses with separate booking or checkout platforms.
Parent companies managing multiple brands or audiences.
Accurate Attribution for Paid Media
Ensures clicks and conversions from Google Ads, social campaigns, and other paid channels are correctly attributed, avoiding inflated session counts or lost conversions.Support for Multi-Channel Strategies
Plays a key role in tracking performance across email marketing, SEO, and content marketing when multiple domains are involved.
How to set up cross-domain tracking in Google Analytics 4
There are two ways to configure this type of tracking. We’ll go into detail on each one.
- Cross-domain tracking setup via GA4 interface
- Manual Cross-domain tracking setup
Cross-domain tracking setup via GA4 interface
Cross-domain tracking will only work if all involved websites use the same GA4 property. You can implement this by adding the tracking code directly to each site using gtag.js or by deploying it via Google Tag Manager (GTM). Regardless of the method, both websites must share the same GA4 property.
Step #1. Open your account in GA4, go to the Admin section > Data Streams.

Note: If you don’t have a verified GA4 account, here’s a step-by-step guide on how to set up GA4.
Step #2. Click on your property’s data stream.

Step #3. Scroll down to the Google Tag section and navigate to the Configure Tag Settings block.

Step #4. Within the Settings section, click Configure Your Domains

Step #5. To configure your tracked domains, click on Add condition in the Configure Your Domains section. Next, choose a match type for the domain conditions and enter the identifier for the domain you want to match in the Domain field (e.g., yourwebsite1.com)

Step #6. Save all changes by clicking on the Save button at the top of the screen
And that’s it. GA4 will begin collecting user interaction data on your site as they move from one domain to the other.
Manual Cross-Domain Tracking Setup
While GA4’s built-in settings are the recommended way to track users across your domains, there are cases where a custom setup is needed. This involves manually adding code to your websites.With this approach, you use the get
and set
commands of the gtag.js API to persist user IDs across domains.
For example, if you want to capture a user’s ID on the initial site, you would use a specific command to retrieve the ID and store it in a variable for later use:
gtag('get', 'TAG_ID', 'client_id', (client_id) => {
// Store the client ID in a variable.
});
gtag('get', 'TAG_ID', 'session_id', (session_id) => {
// Store the session ID in a variable.
});
Once you have those IDs, you can add them to the link directing users to the other website (destination domain):
<a href="https://example.com/?clientId=XXXXX&sessionId=YYYYY">example.com</a>
On the destination site, you can then read that information from the link and set them with the config command:
gtag('config','TAG_ID', {
'client_id': getClientIdFromUrl(),
'session_id': getSessionIdFromUrl()
});
For more on this topic, refer to Google’s guide on configuring cross-domain measurement manually.
Common Problems with Cross-Domain Tracking
Cross-domain tracking in GA4 can sometimes fail due to misconfigurations or technical conflicts. Let’s examine the most frequent issues and how to address them.
1. Incorrect Configuration
The most common issue is misconfiguring cross-domain tracking settings. Even a small mistake, like entering the wrong domain, can result in inaccurate data and a distorted view of user acquisition. Always double-check each step of your setup, following the instructions provided in the GA4 cross-domain configuration guide.
2. URL Redirects
GA4 uses the _gl
parameter to track users across domains. However, this parameter can be removed during redirects or if a destination page doesn’t support arbitrary query parameters.
How to check: Use Chrome Developer Tools to inspect network requests and see how the _gl
parameter is handled.
Solution: Ensure that all redirects preserve the _gl
parameter. Since this often requires advanced technical skills, Google recommends consulting an experienced web developer.
3. Conflicting Scripts
Other scripts on your site can interfere with cross-domain tracking, especially if they use methods like Event.stopPropagation()
or trigger navigation via JavaScript.
Tracking works by passing click information through a chain of HTML elements to a central hub (the document node), where GA4 adds the _gl
parameter. If scripts block this flow, the _gl
parameter may never reach its destination, breaking cross-domain tracking.
Solution: Review conflicting scripts and consider developer assistance to resolve these issues.
4. Multiple GA4 Properties
Each GA4 property has its own unique identifier and separate data collection system. Client-side identifiers, like cookies, cannot be shared between properties.
Key point: Both domains must use a single GA4 property to ensure accurate cross-domain user tracking. Using multiple properties can lead to incomplete or inconsistent data.
5. Cookie-Blocking Extensions
GA4 relies on cookies to identify users across domains. Browser extensions that block cookies (e.g., Adblock Plus) or prevent third-party cookies can disrupt cross-domain tracking.
Impact: If cookies cannot be stored, GA4 cannot track users consistently across your domains.
Solution: While you cannot control users’ browser extensions, be aware that this may affect tracking accuracy and plan your analytics strategy accordingly.
Verifying Cross-Domain Tracking in GA4:
Want to make sure your cross-domain setup is working accurately? In this section, we’ll explore two methods for understanding and dealing with associated issues.
Look for the GL parameter
1. Open a webpage featuring the link pointing to the second domain that you set up for cross-domain tracking.
2. Click that link to visit the second website. Double-check to see if the second webpage opens properly.
3. Observe the URL on your second domain. Check to see if it contains the linker parameter _gl. It might look something like this: https://www.example.com/?_gl=1*xyzcde5*.
Found the _gl parameter? Awesome! This means your cross-domain tracking is working. Expect to see data collected from both websites in your GA4 reports soon.
Summary
Tracking user behavior across multiple websites can be challenging. By default, GA4 does not automatically track visitors as they move between different domains.However, with the right configuration, GA4 can give you a complete view of the customer journey across all your sites. This insight allows you to identify opportunities for improvement, personalize content, and create a seamless user experience for your audience.
Follow the step-by-step instructions in this guide carefully to set up cross-domain tracking effectively. Once implemented, you’ll unlock more accurate data, smarter marketing decisions, and a boost to your business growth.
Latest Projects
Maximize Your ROI: Performance Max Campaign Strategy Insights
Google Ads Remarketing
Facebook Pixel Conversion API
Web Analytics demo
Stay updated on our best deals in CRO, Analytics, and Advertising
Best Marketing Tools

Andry Brook
Chef Director, Rafel Fashion Ltd, UAE

Anamica Sen
Director Sales
We honestly reference Hostinger as the benchmark for our engineers when providing support. We honestly reference Hostinger as the benchmark for our engineers when providing support.We honestly reference Hostinger as the benchmark for our engineers when providing support.

Synthi Hook
Managing Director, Soft Fashion Ltd, Canada

Testi
Techno, UAE

Robert Lee
Techno Manager, United States
I could manage the hosting, domain name, and SSL certificate in one place, which was really refreshing.
Thanks for vising my blog post
Looking for Assistance with Cross-Domain Tracking Setup?