Skip to main content
← Back to blog

Cross-Domain Tracking in GA4: Stop Losing Sales to "Referral"

19 August 20268 min read

Cross-Domain Tracking in GA4: Stop Losing Sales to "Referral"

Cross domain tracking lets GA4 follow one visitor across two or more websites you own as a single journey. Without it, a user who arrives from a Google ad on your main site and then completes a purchase on your separate checkout or booking domain looks like two different visits. Worse, the sale is often credited to your own website as a "referral", and the ad that actually drove it gets nothing.

If you have ever seen your own domain, your booking platform or your shop subdomain sitting in the referral report with a suspicious number of conversions, this guide is for you.

Quick answer: Cross-domain tracking in GA4 is set up in Admin, Data streams, Configure tag settings, Configure your domains. Add every domain you own that shares the journey. GA4 then adds a _gl linker parameter to links between those domains so the same client ID and session carry over. For third-party domains you do not control, such as payment gateways, use List unwanted referrals instead. Test with GA4 DebugView and Tag Assistant.

Why cross domain tracking matters

GA4 identifies users with a first-party cookie (_ga) that belongs to one domain. When a user moves from example.co.uk to example-bookings.com, the second site cannot read the first site's cookie. So GA4:

  • Creates a new client ID, counting one person as two users
  • Starts a new session
  • Records the first domain as the referral source of that new session

Because the conversion happens in the new session, the original source (paid search, organic, email) loses credit. Your Google Ads campaigns look weaker than they are, and your referral channel looks far stronger.

When you need it and when you do not

You need cross-domain tracking when

  • Your checkout, booking system or portal sits on a different domain that you control and can tag, for example shop-example.com alongside example.co.uk
  • You run several brand sites with a shared journey
  • A third-party platform lets you add your own GA4 tag or GTM container, such as some booking and event platforms

You do not need it for subdomains

GA4 handles subdomains automatically. Because the _ga cookie is set at the highest level domain by default, www.example.co.uk and shop.example.co.uk share the same cookie. As long as both use the same Measurement ID, you do not need to add them to cross-domain settings.

You need a referral exclusion instead when

You send users to a domain you cannot tag, such as PayPal, Stripe-hosted checkout, a card authentication page or a bank's 3D Secure step. Users return to your site, and you do not want that return trip to start a new session credited to the payment provider. In GA4 this is done with List unwanted referrals, which is GA4's version of a referral exclusion.

How to set up cross-domain tracking in GA4

A laptop screen showing GA4 cross domain tracking settings with domain names configured correctly.

Step 1: Use the same GA4 property on every domain

Each domain must send data to the same GA4 property and ideally the same web data stream and Measurement ID. If your booking platform is sending to a different property, cross-domain tracking cannot join the journeys.

Step 2: Configure your domains

  1. In GA4, go to Admin, Data streams and select your web stream.
  2. Click Configure tag settings.
  3. Click Configure your domains.
  4. Add a condition for each domain, for example "contains example.co.uk" and "contains example-bookings.com".
  5. Save.

GA4 will now automatically decorate links between those domains with a _gl parameter carrying the client ID and session information. The receiving domain reads it and continues the same session.

Step 3: List unwanted referrals

  1. In the same Configure tag settings screen, click Show more, then List unwanted referrals.
  2. Add payment gateways and any other third-party domains users pass through before returning, for example "contains paypal.com".
  3. Save.

Note that GA4 automatically treats domains in your cross-domain configuration as non-referrals, so you do not need to add your own domains here as well.

Step 4: If you use Google Tag Manager

The settings above work with a Google tag deployed through GTM, because cross-domain configuration lives in the GA4 interface. Check that:

  • The Google tag fires on all pages of every domain
  • No legacy settings in the tag (such as a hard-coded cookie_domain or old linker fields) conflict with the GA4 settings
  • There is not a second, hard-coded gtag snippet on the other domain sending to a different property

Situations where automatic linking fails

GA4's link decoration works on standard clickable links. It can fail when:

  • Users move between domains through a form submission using POST, JavaScript redirects or a button that is not a normal link. You may need to add the linker parameter manually.
  • Redirects strip query strings. If the destination domain redirects and drops the _gl parameter, the session breaks. Configure redirects to preserve query parameters.
  • The destination is loaded in an iframe. Embedded booking widgets and forms in iframes do not pass cookies the same way, and many browsers restrict third-party cookies. Iframes often need a custom solution, such as passing data with postMessage, or tracking the conversion on the parent page.
  • Consent differs by domain. If one domain has a consent banner and the other does not, or consent is not shared, the second domain may not set cookies until the user accepts again. Keep consent consistent across the journey.
  • The _gl parameter is too old. The linker value expires after a short time, so links copied and shared later will not join sessions. This is expected behaviour.

How to test cross-domain tracking

Never assume it works. Test it.

A magnifying glass inspecting a website URL showing the _gl linker parameter for cross domain tracking.
  1. Open your site with GA4 DebugView enabled. Use Tag Assistant (tagassistant.google.com) or the GTM Preview mode so your device appears in GA4 DebugView.
  2. Click through to the second domain. Check the URL in the address bar when you land. You should see a _gl= parameter appended.
  3. Compare client IDs. In your browser's developer tools, look at the _ga cookie value on both domains. The client ID part should match.
  4. Watch DebugView. You should see one continuous stream of events from the same device, with no new session_start when you cross domains.
  5. Complete a test conversion. Confirm the key event appears in the same session.
  6. Check reports a day or two later. Your own domain should disappear, or nearly disappear, from the referral list for new data.

Signs your cross-domain setup is broken

An analytics dashboard showing referral traffic reports where a website's own domain appears incorrectly.
  • Your own domain, booking platform or checkout appears in Session source / medium as "referral"
  • Users and sessions seem high compared with real visitor numbers
  • Conversions attributed to referral are high while paid and organic are low
  • A rise in Direct or Unassigned traffic on the second domain. Our guide to Unassigned and (not set) traffic in GA4 covers related causes
  • GA4 and Google Ads conversion gaps widen, particularly for sales completed on the second domain. See why GA4 and Google Ads show different conversions

Cleaning up historical data

Cross-domain fixes only apply going forward. Historical sessions stay split. To make past reports more useful:

  • Annotate the date of the fix in your reporting so trends are read correctly
  • Use Explorations filtered to exclude self-referrals when analysing older periods
  • Compare conversion totals with your ecommerce platform or booking system, which will not have been affected by the tracking break

Cross domain tracking checklist

Use this short list during any tracking audit:

  • All domains send to the same GA4 property and stream
  • Every owned, separate domain is listed in Configure your domains
  • Subdomains are not unnecessarily listed, and share one Measurement ID
  • Payment gateways and other untaggable domains are listed as unwanted referrals
  • Links between domains carry the _gl parameter
  • Redirects preserve query strings
  • Consent is consistent across domains
  • Test conversions show in one session in DebugView

FAQs

Do I need cross domain tracking for subdomains in GA4?

No. GA4 sets its cookie at the top-level domain by default, so subdomains such as shop.example.co.uk and www.example.co.uk share the same user and session automatically, provided they use the same Measurement ID.

What is the difference between cross domain tracking and a referral exclusion?

Cross-domain tracking joins sessions across domains you own and can tag. A referral exclusion, called List unwanted referrals in GA4, stops third-party domains such as payment providers from starting new sessions and stealing credit.

Why does my own website show as a referral in GA4?

Usually because users cross between two domains you own without cross-domain tracking, or because a redirect or form strips the _gl parameter. It can also happen if a page is missing the GA4 tag.

Can I track a booking widget in an iframe?

Often not reliably with standard cross-domain settings, because browsers restrict cookies in iframes. Common workarounds include sending events from the iframe to the parent page, or tracking the confirmation on your own domain.

Stop losing sales to "referral"

If your own domains or checkout are stealing credit from your marketing, our Tracking Audit + Fix costs a fixed £199 with no retainer. We check your GA4 configuration, validate GTM, test conversions across domains and fix the issues we find. Get My Audit and get credit back where it belongs.

Share