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:
- Main marketing site on one domain, checkout or booking on a separate domain
- Blog or help center on a subdomain using a different TLD (e.g.,
help.brand.comusing a separate GA4 property) - SaaS product on
app.yourbrand.comalongside a marketing site onyourbrand.com - Multi-brand portfolios where users land on one brand's domain and complete a transaction on a shared platform domain
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.
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:
- Inflated session counts — each domain crossing starts a new session, so a single user journey that touches two domains counts as two or more sessions
- Attribution overwriting — the original traffic source (paid search, email, social) is replaced by the self-referral when the user moves between domains
- Broken funnel reports — funnel explorations that span domains will show users dropping off at the domain boundary, even if they completed the flow
- Inflated new user counts — GA4 treats the cross-domain return as a new user if the session isn't stitched
How to Configure Cross-Domain Tracking
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.
- In GA4, go to Admin → Data Streams → select your web stream
- Click Configure Tag Settings
- Click Show All and select Configure your domains
- Add each domain that is part of your user flow — include all variants (with and without
www, if applicable) - 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.
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.
- In the same Configure Tag Settings panel, click List Unwanted Referrals
- Add each domain from your cross-domain flow
- 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
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:
- The destination domain doesn't have a GA4 tag — if only one domain is tagged with GA4, there's no receiving end for the linker parameter. Both domains need the same Measurement ID.
- The linker parameter is stripped by the destination domain — some redirect setups, proxy configurations, or URL rewriting rules remove query parameters from incoming requests. Test by manually clicking through and checking whether
_glsurvives in the URL bar. - JavaScript rendering delays — if links are rendered asynchronously after page load (by a React or Vue router, for example), GA4 may not inject the linker parameter because the links didn't exist when the tag initialized. Links added to the DOM after page load require additional configuration.
- Only one direction configured — if you add domain B to domain A's list but not vice versa, navigation from B back to A will create a new session.
- iFrame-hosted checkout — if the second domain is embedded in an iFrame rather than being a direct navigation, cross-domain tracking doesn't apply. The iFrame is a separate document origin and requires a different approach (postMessage-based session passing).
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.
