ananas.team
§ 07·ARTICLE
GA4The ananas.team crew··

Cross-Domain Tracking in GA4: How to Stop Losing the Source Between Your Own Domains

A typical architecture: the landing page on one domain, checkout on another, payments on a third. Someone walks the chain, and GA4 loses the source at every hop. In your reports, half the conversions were driven by... your own site. Self-referral. The traffic source resets to zero, and your advertising looks worse than it performs.

Why this happens

GA4 stores client_id in a cookie, and a cookie is bound to a domain. The moment someone moves from domain A to domain B, the cookie doesn't travel, GA4 creates a new user with a new session, and records domain A as the source. In other words, your own first domain has "stolen" attribution from the real ad source.

For projects with a funnel spread across domains this is a disaster — advertising is systematically undervalued while "direct traffic" and "referral from your own site" are inflated.

Linker — how GA4 carries client_id across

The fix is the linker. It appends a _gl parameter to the outgoing link with the client_id encoded inside. Domain B sees that parameter and understands: this is the same user who was on domain A, no need to create a new one.

For this to work, you have to list all of your domains in the GA4 stream settings. GA4 then adds _gl automatically to the links between them. Leave a domain off the list and the linker won't fire for it.

Referral exclusions — finishing off self-referrals

Step two is the referral exclusion list. You add all of your own domains and payment gateways to it. GA4 then stops counting a hop from your own domain, or from the payment provider, as a new source.

Payment providers are a story of their own. Someone leaves for an external provider's payment page, comes back, and the provider is recorded as the conversion source. Nonsense. Add the gateway to the exclusions and attribution keeps the real ad source.

Subdomains — where people configure things they don't need

An important nuance: if everything sits on subdomains of a single top-level domain, you don't need cross-domain setup at all. The cookie is already shared across every subdomain. People waste time configuring the linker where it isn't required, and then chase strange bugs.

Cross-domain is only needed between different top-level domains. Subdomains are free out of the box.

Verification

Click a link between domains and look at the URL — a _gl parameter with a long string should appear there. If it does, the linker works. Then check in your reports that source/medium on conversions has stopped showing your own domains.

The take: before you blame advertising for poor conversion, check whether you're losing the source on hops between domains. I've seen projects where "direct traffic" was inflated twofold purely because cross-domain wasn't working. After the fix the advertising suddenly looked fine — it had always been fine, attribution was simply robbing it.

§ 08·RELATED