Cross-domain tracking is needed when users move between two domains that are both part of the same product or checkout flow — for example, from yourbrand.com to a separate checkout subdomain at checkout.yourbrand.com, or from a main site to a separately-hosted booking or booking page. Without it, each domain transition starts a new session in GA4, and the original traffic source is lost.

When You Need Cross-Domain Tracking

You need cross-domain tracking whenever users navigate between two or more distinct hostnames as part of a single business flow. Common cases:

You do not need cross-domain tracking for subdomains on the same parent domain. GA4 handles shop.example.com and example.com as the same domain by default — cookies persist across subdomains automatically.

The symptom to look for: your own domain appearing in Traffic Acquisition as a referral source. If yourbrand.com or a related domain shows up as a session source in your acquisition reports, cross-domain tracking is either missing or misconfigured.

What Broken Cross-Domain Tracking Looks Like

Before configuring anything, check whether you actually have a problem. In GA4, go to Reports → Acquisition → Traffic Acquisition and change the primary dimension to Session source / medium. Look for your own domain or any related domain appearing as a referral source — entries like checkout.yourbrand.com / referral or bookings.partner.com / referral.

The data impact of broken cross-domain tracking:

How to Configure Cross-Domain Tracking

01
GA4 Admin
Add domains to the cross-domain list in your Data Stream settings

The primary configuration is in GA4, not GTM. You specify which domains should be treated as the same session — GA4 then automatically appends a _gl linker parameter to links between those domains, passing the session and user identifiers across the domain boundary.

  1. In GA4, go to Admin → Data Streams → select your web stream
  2. Click Configure Tag Settings
  3. Click Show All and select Configure your domains
  4. Add each domain that is part of your user flow — include all variants (with and without www, if applicable)
  5. Save

GA4 will automatically inject the linker parameter into links that point to any domain in this list. No additional JavaScript or GTM configuration is needed for the basic case.

You must list all domains in the same configuration — both the origin and destination. If you only add the destination domain, links from the destination back to the origin domain won't be stitched, and return navigation will break the session.
02
Referral Exclusions
Add cross-domain partners to the unwanted referrals list

Cross-domain configuration prevents new sessions from starting at each domain boundary, but only if the destination domain is also configured to receive the linker parameter correctly. As a belt-and-suspenders measure, also add each partner domain to the referral exclusion list so that if the linker parameter is ever missing, the referral won't overwrite the original session source.

  1. In the same Configure Tag Settings panel, click List Unwanted Referrals
  2. Add each domain from your cross-domain flow
  3. Save

This is the same setting used to exclude payment processors. The effect is: if GA4 sees a session arriving from these domains, it won't attribute that session to the domain as a referral source — it will continue the existing session instead.

How to Verify It's Working

03
Verification
Check for the linker parameter and confirm sessions stitch correctly

Check for the _gl parameter

The most direct verification is to navigate from one domain to another and inspect the destination URL. If cross-domain tracking is configured correctly, the link from domain A to domain B will have a ?_gl= parameter appended. Open your site, click a link that goes to the second domain, and check the URL bar on the destination page — you should see something like ?_gl=1*1abc123*....

If the _gl parameter is absent, the linker is not being injected. Check that the source domain has the same GA4 tag (same Measurement ID) and that both domains are listed in the configuration.

Confirm in GA4 DebugView

With GA4 DebugView open (Admin → DebugView), navigate through the cross-domain flow in a browser with debug mode enabled (add ?gtm_debug=x or use the GTM preview). You should see a single continuous stream of events across both domains — same session_id, same client ID — with no session reset between domains.

Check the acquisition report

After the configuration has been in place for a few days, revisit Traffic Acquisition filtered by your domain as a referral source. Self-referrals should be absent or minimal. If they're still appearing at significant volume, the linker parameter isn't being received correctly on the destination domain.

Common Failure Patterns

These are the most frequent causes of broken cross-domain tracking even after it appears to be configured:

GA4 Health Check checks for self-referrals in your traffic data and flags cross-domain tracking gaps as part of the configuration audit. Run a 60-second audit to see whether your domain setup is causing session fragmentation.

Travis Gunn
Founder of GA4 Health Check. Working with Google Analytics since 2013, with over 250 clients audited across almost every industry vertical. 100% Job Success on Upwork for over a decade.