Glossary Term

Cross-Domain Tracking

glossary cross domain tracking featured

Cross-domain tracking is a method that lets analytics tools treat a user’s activity across two or more domains as a single, continuous session. It works by passing the user’s client ID from one domain to the next through a URL linker parameter, so GA4 does not count the second domain as a brand-new visitor. Marketers use it when a customer journey spans separate domains, such as a marketing site and a third-party checkout.

Why Cross-Domain Tracking Matters

Without cross-domain tracking, one journey looks like two unrelated visits. When a user moves from example.com to checkout-provider.com, GA4 assigns a new client ID on the second domain. The original source is lost, and the second domain shows up as referral traffic from the first.

That breaks attribution in two ways. Conversions get credited to your own site instead of the ad or email that started the journey. And sessions inflate, because one person becomes two users with two sessions.

Cross-domain tracking is essential for any funnel that crosses domains: a Shopify store on a custom domain routing to a .myshopify.com checkout, a SaaS marketing site handing off to a separate app domain, or a booking site sending users to a partner payment page. Fixing it restores clean referral traffic data and accurate conversion paths.

How Cross-Domain Tracking Works

Cross-domain tracking works by carrying the GA4 client ID across domains in the URL. GA4 stores each user’s identity in a first-party cookie (_ga), which cannot be read by a different domain. To bridge the gap, GA4 appends a linker parameter called _gl to outbound links pointing at your other domains.

A decorated link looks like this:

https://checkout-provider.com/cart?_gl=1*abc123*_ga*NzY4...

The receiving domain reads the _gl value, extracts the client ID, and writes it into its own _ga cookie. Because both domains now share one client ID, GA4 stitches the visits into a single session and keeps the original traffic source intact. This process is often called link decoration.

The _gl parameter is time-limited. Google caps its validity to a short window (a few minutes) so an old shared or bookmarked link cannot merge two unrelated users. If the parameter expires or gets stripped, the client ID is not passed and the session splits.

How to Set Up Cross-Domain Tracking in GA4

GA4 handles cross-domain tracking in the admin settings, with no code required for standard cases.

  1. In GA4, open Admin, then Data Streams, and select your web stream.
  2. Click Configure tag settings, then Configure your domains.
  3. Under Cross-domain linking, add every domain in the journey (for example example.com and checkout-provider.com).
  4. Use the match type (contains, begins with, exact) that captures each domain.
  5. Save. GA4 now auto-decorates links between the listed domains with the _gl parameter.
  6. Add each other domain to the referral exclusion logic if it still appears as a referral. In GA4, list them under List unwanted referrals.

To confirm it works, click a link from one domain to the other and check that the destination URL carries a _gl parameter. Then verify in GA4 real-time reports that the session source is preserved.

Cross-Domain vs Cross-Device Tracking

Cross-domain tracking and cross-device tracking solve different problems and are easy to confuse.

Attribute Cross-Domain Tracking Cross-Device Tracking
Problem solved One user across multiple domains One user across multiple devices
Mechanism Client ID passed in the URL (_gl) User-ID or Google signals
Requires login No Often yes (for deterministic matching)
Typical case Site to third-party checkout Phone browse, desktop purchase

Cross-domain tracking connects domains within a single device and browser. Cross-device tracking connects the same person across a phone, tablet, and laptop. A complete measurement setup often needs both.

Common Cross-Domain Tracking Issues

Most cross-domain problems trace back to the _gl parameter being blocked or lost.

  • Redirects stripping the parameter: a server-side redirect between domains can drop _gl. Preserve query parameters through every redirect hop.
  • Missing domains in the config: only domains listed in GA4’s cross-domain settings get decorated. Forgetting one splits the session.
  • Referral exclusion not set: even with linking on, the second domain can appear as a referral if it is not excluded.
  • Safari and privacy browsers: intelligent tracking prevention shortens cookie life, so the _ga cookie may expire before the return trip, breaking the match.
  • Links opened in new contexts: users who copy the base URL without _gl, or open it in a fresh tab hours later, will not carry the client ID.

If your conversion counts look inflated or the source shows your own domain, cross-domain tracking is the first thing to audit. The linkutm analytics dashboard shows the true click source next to your GA4 data, which helps spot where a handoff is dropping attribution.

Frequently Asked Questions

What is cross-domain tracking in simple terms?

Cross-domain tracking lets an analytics tool follow one user across two or more websites as a single visit. It passes the user’s ID from one domain to the next in the link, so the second site does not treat the person as a new visitor. Marketers use it when a journey crosses domains, like a store and a separate checkout.

How does cross-domain tracking work in GA4?

GA4 adds a linker parameter called _gl to links pointing at your other domains. That parameter carries the client ID from the _ga cookie. The receiving domain reads it and writes the same client ID into its own cookie, so both domains report one shared user and one session.

What is the linker parameter?

The linker parameter is the _gl value GA4 appends to cross-domain links. It is an encoded string containing the user’s client ID and a timestamp. The destination domain decodes it to keep the same GA4 identity, a process known as link decoration.

How do I set up cross-domain tracking?

In GA4, go to Admin, Data Streams, then Configure tag settings, and open Configure your domains. Add every domain in the journey and save. GA4 then decorates links between those domains automatically. Add the other domains to the unwanted referrals list to stop self-referrals.

Is cross-domain tracking the same as cross-device tracking?

No. Cross-domain tracking connects one user across multiple websites on the same device. Cross-device tracking connects the same person across different devices, usually through a User-ID or Google signals. They solve separate problems and are often used together.

To confirm your tagged links keep their source through a cross-domain handoff, run them through the free UTM checker at linkutm.