All posts
5 min readga4, cross-domain, attribution

Cross-domain tracking in GA4: stop your sessions splitting in two

If your funnel spans two domains — a marketing site and a separate checkout, or a third-party booking host — GA4 will, by default, count one user as two: session split, source lost, conversions misattributed. Here's the fix.


Cross-domain tracking stops one visitor's journey from being split into two sessions when they move between domains you own — your marketing site and a separate booking or checkout domain, for example. GA4 handles it by passing the client ID in a URL parameter between the domains, and configuring it takes about five minutes. What takes longer is realising you needed it: the symptom is a suspicious pile of self-referrals and paid conversions credited to direct.

What actually breaks without it

GA4 identifies a visitor by a client ID stored in a first-party cookie. First-party cookies are scoped to a domain, so example.com cannot read the cookie set by shop.example.net.

When someone crosses from one to the other, GA4 sees a brand new visitor with no history. Three things go wrong at once:

  • The session splits. One journey becomes two sessions, inflating your session count and destroying funnel continuity.
  • Attribution is lost. The original source — a Google ad, an email — belonged to the first session. The second session is a referral from your own first domain, and the conversion gets credited to it.
  • Self-referrals appear in your acquisition reports, which is the diagnostic fingerprint.

If your checkout is on a different domain and you have not configured this, your paid campaigns look far worse than they are, and your direct traffic looks implausibly good at converting.

Do you actually have a cross-domain problem?

This is worth checking before configuring anything, because the answer is often no.

Subdomains do not need cross-domain tracking. www.example.com and shop.example.com share cookies at the example.com level automatically. GA4 handles subdomains out of the box, and configuring cross-domain tracking for them is a common, harmless-but-pointless piece of cargo cult. Subdomains vs cross-domain covers telling the two apart.

Genuinely different registrable domains do. example.com and examplebooking.com cannot share cookies at any level.

The quick test: look at your Traffic acquisition report for referrals from your own domains. If your own domain appears as a referral source, you have the problem.

Configuring it in GA4

Two settings, one in each place.

1. Configure domains

In GA4: Admin → Data streams → your stream → Configure tag settings → Configure your domains. Add every domain in the journey — the marketing site, the store, the booking system, anything a visitor crosses to.

This tells the tag to append the linker parameter when a link points at a listed domain.

2. Exclude the domains as referral sources

In the same tag settings: List unwanted referrals. Add your own domains.

Skipping this step is the most common half-configuration. Cross-domain linking will pass the client ID correctly, and the second domain will still start a new session attributed to a referral from the first — because GA4 treats any external referrer as a campaign change. Both settings are required; neither works properly alone.

How the handoff works

When a visitor clicks a link to a configured domain, the tag appends a _gl parameter containing the client ID and session information. The receiving domain's tag reads it, adopts the same client ID, and continues the session.

Two consequences worth understanding:

  • The parameter must survive the navigation. Redirects that strip query parameters break the handoff silently — the visitor arrives with no _gl, and GA4 starts a fresh session.
  • It only works on links and forms the tag can see. A JavaScript redirect, a server-side 302, or a link built after the tag initialised may not get the parameter appended. For those, you may need to pass the client ID explicitly.

Special cases that break it

Third-party checkouts and payment providers. If the visitor leaves for a hosted payment page and comes back, the return trip is the risk — you need the payment provider's return URL to preserve your parameters, or the returning visitor is a new session with a payment-provider referral.

iframes. Content in an iframe on another domain does not participate in the linker. Track it deliberately or accept the gap.

Email and ad links. These do not need cross-domain linking — they need consistent UTM tagging, since the visitor is arriving fresh. Do not confuse the two problems.

Verifying it works

  1. Click a link from domain A to domain B and look at the resulting URL. A _gl parameter should be present.
  2. Compare the client ID on both sides. In the network panel, check the cid parameter on a GA4 request from each domain — they must match. This is the definitive test.
  3. Check for self-referrals in the Traffic acquisition report after a few days. They should be gone.
  4. Check session counts. Total sessions should fall slightly once journeys stop splitting, which is a sign of success rather than lost traffic.
  5. Walk a real conversion path end to end and confirm the conversion is attributed to the original source rather than to your own domain.

Debugging tags in the browser covers reading the cid parameter if you are not familiar with the network panel.

Do not forget the ad platforms

Cross-domain configuration in GA4 does not fix your advertising platforms. Google Ads needs its conversion tracking present on the converting domain, and Meta needs its pixel there too. A conversion happening on domain B with the pixel only on domain A is simply not recorded, regardless of how well GA4 stitches the session.

FAQ

Do subdomains need cross-domain tracking in GA4?

No. Subdomains of the same registrable domain share cookies automatically. Configuring cross-domain tracking for them is unnecessary, though generally harmless.

Why do I see my own domain as a referral source?

Because a session started on a domain that could not read the previous domain's cookie. That is the classic symptom of missing cross-domain configuration, or of configuring the domains list without also excluding referrals.

Does cross-domain tracking work if the user has an ad blocker?

If the GA4 tag itself is blocked, nothing works — including the handoff. Cross-domain linking is not a workaround for blocked collection.

Will cross-domain tracking reduce my session count?

Yes, slightly, because journeys that were being counted as two sessions become one. That is the intended outcome, not a data loss — annotate the change date so the step is not misread later.

Do I need cross-domain tracking for a third-party checkout?

If the checkout runs on a domain you can add your tag to, yes, and it is worth doing. If it is a hosted page you cannot instrument, focus on preserving parameters through the return URL and on server-side conversion tracking instead.

Check whether your domains are firing the same GA4 property, and whether either is loading it twice, with the free tracking audit.


See where your tracking stands

Run the same 13-check audit referenced in this post against any URL. No signup, results in seconds.

Run a free audit