
Understanding Cross-Domain Tracking in GA4
What is Cross-Domain Tracking in GA4?
Cross-domain tracking is a configuration in Google Analytics 4 that enables the continuous tracking of users as they navigate between different domains within your business ecosystem. It’s a crucial setup for businesses that operate multiple websites or have separate domains for different parts of their customer journey.
The Technical Foundation of User Identification in GA4
Google Analytics 4 identifies users and their sessions through specific identifiers:
Session ID: Session ID is a timestamp of when a session began.
Client ID: A unique identifier assigned to each user’s browser or device
The client ID persists across sessions (unless cookies are cleared), while the session ID is regenerated with each new session.
When a user visits your website, GA4 creates cookies and uses them to recognize returning visitors and track their behavior. However, due to browser security policies, cookies set by one domain (example1.com) cannot be accessed by another domain (example2.com) by default. This is where the problem begins.
Example of the _ga cookie:

Let’s consider a practical example:
Say your business owns two websites with different domains:
- www.example1.com – Where you showcase your products
- www.example2.com – Where customers complete their purchases
A typical user journey might look like this:
- User clicks on a Google Ad
- Lands on www.example1.com
- Browses products and selects one
- Clicks “Buy Now” which directs them to www.example2.com
- Completes purchase on www.example2.com
Without cross-domain tracking, here’s what happens:
When a visitor lands on www.example1.com, GA4 automatically stores a cookie with a unique client ID on that visitor’s browser. This cookie identifies the user for tracking purposes. Later, when the visitor clicks on the “Buy Now” link and is redirected to www.example2.com, GA4 is also activated on this second website.
However, since this is a completely different domain, the GA4 implementation on www.example2.com cannot access the cookie stored by the first domain due to browser security restrictions. So even though the user is physically the same person, GA4 has no way of knowing this and treats them as a new visitor, creating a fresh cookie with a different client ID.
Without cross-domain tracking, here’s what happens in GA4:
On www.example1.com:
- GA4 assigns Client ID: ABC123
- Session ID: XYZ789
- Source/Medium: google / cpc
On www.example2.com:
- GA4 assigns NEW Client ID: DEF456
- NEW Session ID: UVW321
- Source/Medium: example1.com / referral
As a result:
- You see two separate users in your reports
- Your Google Ad ROI calculation is inaccurate
- User journey analysis is fractured
Without cross-domain tracking, your analytics will show artificially inflated user numbers. For instance, if 1,000 users navigate from your main domain to your checkout domain, GA4 will count this as 2,000 users. This skews all your user-based metrics, including conversion rates.
Understanding the complete user journey is important for optimizing your website and marketing strategies. Cross-domain tracking allows you to see the entire path, including how users navigate between domains, which pages lead to domain transitions, and which journeys result in conversions.
Cross-Domain vs. Subdomain Tracking: Important Distinctions
A common source of confusion is understanding when cross-domain tracking is needed versus when it’s unnecessary. Let’s clarify:
Cross-Domain Tracking (Required Configuration)
Cross-domain tracking is necessary when tracking across completely different domains:
- example.com → differentdomain.com
- mystore.com → mycheckout.com
- contentsite.org → memberportal.org
In these cases, the root domains differ, and explicit cross-domain configuration is required.
Subdomain Tracking (Automatic in GA4)
GA4 automatically tracks across subdomains of the same root domain without additional configuration:
- example.com → blog.example.com
- example.com → support.example.com
The key technical difference lies in how cookies work. By default, cookies can be shared between subdomains of the same root domain but not between different root domains. GA4 leverages this by setting cookies at the root domain level, making subdomain tracking automatic.
How Cross-Domain Tracking Works in GA4?
Cross-domain tracking in GA4 relies primarily on the _gl parameter. When configured correctly, GA4 adds this parameter to links pointing to your other domains. This parameter contains encoded information about the user’s Client ID and other tracking data.
Here’s the process:
- User visits Domain A (e.g., www.example1.com)
- GA4 assigns a Client ID and stores it in a cookie
- User clicks a link to Domain B (e.g., www.example2.com)
- The GA4 configuration modifies this link, appending the _gl parameter
- User arrives at Domain B with a URL like: www.example2.com/page?_gl=1*2abcde*_ga*MTIzNDU2Nzg5LjE2MTE2ODI0MDA.*_ga_1234*MTYxMTY4MjQwMC4xLjEuMTYxMTY4MjQyMC4w
- The GA4 tag on Domain B reads this parameter
- It extracts the Client ID and other information
- It sets these values in Domain B’s cookies
- The user is now recognized as the same user across both domains
Configuration in the GA4 Interface
Follow these detailed steps to configure cross-domain tracking:
- Access GA4 Admin Settings
- Log into your Google Analytics account (analytics.google.com)
- Select the appropriate GA4 property
- Click on the Admin gear icon in the bottom left corner

2. Navigate to Data Streams

3.Select Your Web Data Stream

4. Access Tag Settings
- Scroll down to find the “Configure tag settings” option

5. Configure Domains
- Look for and select “Configure your domains”
- This opens the domain configuration panel

6. Add Your First Domain
- Click “Add condition”
- For Match Type, select “Contains” from the dropdown
- In the Domains field, enter your first domain (e.g., “example.com”)
Add Additional Domains
- Click “Add condition” again
- Repeat the process for each additional domain
- For example, add “example2.com” as your second domain

7. Save Configuration
After implementation, it’s crucial to verify that cross-domain tracking is functioning correctly:
Basic Verification Method
- Visit your first domain (e.g., www.example.com)
- Find a link that points to your second domain
- Right-click the link and select “Copy link address”
- Verify that the copied URL contains the _gl parameter
- If it doesn’t, wait longer or check your configuration
Advanced Verification Using Network Inspection
- Open your browser’s developer tools
- Navigate to the Network tab
- Visit your first domain
- Click on a link to your second domain
- Examine the request URL in the network panel
- Confirm the presence of the _gl parameter
Frequently Asked Questions About Cross-Domain Tracking in GA4
Here are answers to frequently asked questions:
Q1: Does cross-domain tracking impact site performance?
A: The impact is minimal. The _gl parameter adds a small amount of data to URLs, and the processing occurs asynchronously. Modern browsers handle this efficiently with negligible impact on page load times.
Q2: Do all domains need to use the same property?
A: Yes, all domains must use the same GA4 property (the same measurement ID). Using different properties would defeat the purpose of cross-domain tracking as each property collects data separately.
Q3: What happens if I add a new domain later?
A: You can add new domains to your cross-domain configuration at any time. Simply add the new domain following the same process outlined earlier. Existing domains will continue tracking without interruption.
Q4: Can I use cross-domain tracking with consent management platforms?
A: Yes, but with additional configuration. Ensure your consent management platform (CMP) is configured to:
- Apply the same consent settings across all domains
- Preserve consent state during domain transitions
Q5: Do I need to update my privacy policy when implementing cross-domain tracking?
A: Yes, your privacy policy should disclose:
- That user data is shared across your domains
- Which domains are included in your tracking
- The purpose of this tracking
- That the same analytics cookies apply across these domains
