Cross-domain

Cross-domain tracking in GA4 and GTM, set up properly

The moment a visitor crosses from your main site to a separate checkout, booking or payment domain, GA4 can start a brand-new session and lose the original source. Suddenly your own payment provider is the “source” of the sale. Cross-domain tracking stops that. Here is how it works and how to set it up.

Why crossing domains breaks tracking

GA4 identifies a visitor with a cookie that is tied to a single domain. When they move to a different domain, that identity doesn’t automatically travel with them, so GA4 treats the arrival as a new person on a new session, attributed to a referral from your first domain, or to Direct. The original ad or campaign that brought them in is lost halfway through the journey.

What cross-domain tracking does

Properly configured, GA4 passes a linker parameter (the client ID) in the URL as the user moves between your domains, so the session continues as one person and one journey. The source that started it is preserved all the way to the conversion, even if that conversion happens on a different domain.

How to set it up

Losing sales to “referral” from your own checkout?

We’ll check whether your domains are handing off cleanly. Free 10-second scan of your live setup.

Check my tracking free

The usual gotchas

Payment providers and booking tools are the classic culprits, especially when they open in a new tab or redirect. Subdomains (shop.yoursite.com) are usually fine automatically, but separate domains are not. And if a consent banner blocks the tag on the second domain, the hand-off can still fail even when the configuration is correct.

How to know it’s working

In GA4, your payment or checkout domain should not appear as a referral source for conversions, and sessions should not spike oddly at the point of hand-off. Paid and campaign sources should stay attached to conversions that complete on the other domain.

Get cross-domain set up and verified

We configure and test cross-domain tracking end to end so your sources survive the whole journey. The audit comes off any build.

See how it works & pricing

Related guides

Referral exclusions in GA4 Why paid shows as organic in GA4 GA4 attribution explained Pricing

Datahound are analytics and ad-tracking specialists. We fix broken GA4, Google Ads, Meta and server-side tracking. See pricing · All guides · Back to datahound.agency

Cross-domain tracking: common questions

Do I need cross-domain tracking for subdomains?

Usually no. GA4 treats subdomains of the same domain as one site automatically. Cross-domain setup is needed when you move between genuinely different domains, such as your main site and a separate checkout or booking domain.

Why does my checkout show as a referral in GA4?

Because the session restarted when the user crossed to the checkout domain and GA4 attributed it to that domain as a referral. Setting up cross-domain tracking and adding the checkout domain to referral exclusions fixes it.

Does cross-domain tracking work with GTM?

Yes. You configure the domains in the GA4 tag settings, and as long as the GA4 configuration fires consistently on every domain (and consent doesn’t block it), the client ID is passed between them.