GA4 Cross-Domain Tracking

September 15, 2025

Ever looked at your traffic sources in Google Analytics and seen your own website listed as a top referrer?

It’s a frustratingly common problem. It’s a classic sign that your user journey is broken, with GA4 losing track of visitors as they move between the different domains you own.

The good news is that setting up cross-domain tracking in GA4 is much more straightforward than it used to be.

You can get a single, unified view of a user’s journey (useful for things like LTV reporting), even if it spans across, say, your main marketing site and a separate e-commerce platform.

Here’s how to get it sorted.

Table of Contents

What is cross-domain tracking?

Let’s imagine you have two websites: yourbrand.co.uk (Domain A) and yourbrandshop.com (Domain B).

By default, Google Analytics uses first-party cookies to identify users.

When someone lands on Domain A, GA places a cookie in their browser.

As they navigate from page to page on Domain A, that cookie persists, and Analytics understands it’s the same person.

The problem starts when that user clicks a link to go from Domain A to Domain B. Because of browser security policies, the cookie from Domain A can’t be read by Domain B.

So, as far as GA4 is concerned, a brand new user has just arrived on Domain B.

This causes three main headaches:

  1. Inflated User Counts: One person is counted as two separate users.

  2. Broken Sessions: The original session on Domain A ends, and a new one begins on Domain B.

  3. Self-Referrals: The traffic source for the new session on Domain B is incorrectly reported as yourbrand.co.uk. This goes for your key events too. Gah!

Cross-domain tracking solves this.

It cleverly passes a special parameter in the URL when a user moves from Domain A to Domain B, telling GA4, “Hey, this is the same person who was just over there. Please continue their session.”

Setting up Cross-Domain Tracking

Ready to connect your domains? The setup is all done within your GA4 property’s admin settings.

  1. Navigate to Admin (the cog icon in the bottom-left).

  2. In the Property column, select your Data Streams and click on your main web stream.

  3. Under the Google tag section, click Configure tag settings.

  4. In the Settings screen, click Configure your domains.

configuring domains

From here, you simply add all the domains you want to be part of the same user journey.

You might see some domains already listed under ‘Recommendations’ if GA has auto-detected them; you can just click ‘Add’ to include them.

To add one manually, click Add condition, leave the match type as ‘contains’, and enter the domain (e.g., yourbrandshop.com).

Click Save, and that’s the configuration done.

How to Check if It’s Actually Working

 

The easiest way to verify the setup is to check the URLs yourself.

  1. Go to a page on your first domain (Domain A).

  2. Click a link that takes you to your second domain (Domain B).

  3. Look at the URL in the address bar for Domain B.

You should see a parameter in the URL that looks like _gl=... followed by a long string of characters. For example: https://yourbrandshop.com/?_gl=1*abcde*...

This _gl is the ‘linker’ parameter.

If you see it, it means GA4 is successfully passing the user identity across, and your cross-domain tracking is working correctly.

Troubleshooting

If you’ve followed the steps but aren’t seeing the _gl parameter, it’s usually down to one of two things.

  1. Different GA4 IDs: For this to work, both (or all) of your websites must be using the exact same Google Analytics Measurement ID (the one that starts with ‘G-‘). If you have two separate GA4 properties set up, it simply won’t work.

  2. Pesky Redirects: Sometimes, a redirect can strip the _gl parameter from the URL before the destination page loads. If you click a link and the URL changes a couple of times very quickly, there might be a redirect chain at play. You may need to speak to your web developer to ensure URL parameters are preserved through any redirects.

A Clearer Picture of Your Customers

And that’s really all there is to it. By taking a few minutes to configure your domains, you fix misleading self-referrals and stop artificially inflating your user counts.

More importantly, you gain the ability to accurately track a complete user journey as it flows naturally across your different web properties, giving you a much truer understanding of your marketing performance.

Frequently Asked Questions (FAQs)

1. What is the main purpose of cross-domain tracking in GA4?

Its main purpose is to allow Google Analytics to track a single user session across two or more different top-level domains. This prevents GA4 from creating a new session and a new user when someone navigates from, for example, your main site to your e-commerce site.

2. Do I need to set up cross-domain tracking for my blog on a subdomain?

No. Google Analytics automatically handles tracking across subdomains (e.g., blog.yourwebsite.com and www.yourwebsite.com) without any special configuration.

3. How can I confirm my GA4 cross-domain tracking is working?

Click a link from your first domain to your second. When the new page loads, check the URL in your browser’s address bar. If you see a parameter like ?_gl= or &_gl= followed by a string of characters, it’s working.

Kyle

Author

Hello, I'm Kyle Rushton McGregor!

I’m an experienced GA4 Specialist with a demonstrated history of working with Google Tag Manager and Looker Studio. I’m an international speaker who has trained 1000s of people on all things analytics.

Scroll to Top