Skip to content
Google AnalyticsHow-to guide

How to Set Up Cross-Domain Tracking in GA4 (7 Steps)

To set up cross-domain tracking in GA4, put the same Google tag on every domain, add each domain under Configure your domains in your web stream's tag settings, then test that links between them carry the _gl parameter.

By Kristijan GjorgjioskiIndependent SEO consultant

Published 18 October 2026 · 7 min read

Key takeaways

  • Cross-domain measurement keeps one visitor and one session when someone moves between two root domains, such as your site and a separate booking or checkout domain.
  • Every domain must use the same G- tag ID from the same web data stream, or the setup cannot work.
  • Subdomains of one site usually need no cross-domain setup, because Google tags set cookies on the highest-level domain by default.
  • Domains you cannot tag, like most payment providers, belong in the unwanted referrals list instead.

If you searched for GA4 cross domain tracking, you have probably seen the symptom already: your own booking tool or checkout appearing as a top referral source.

Sales that started in search get credited to a domain you own.

This guide shows how to set up cross-domain measurement properly, in seven steps.

Google calls the feature cross-domain measurement, and it fixes the problem only when every piece is in place.

Before You Start

Cross-domain measurement links sessions across different root domains, such as example.co.uk and example-bookings.com.

You need:

  • The Editor role or above in GA4. Google requires it to configure domains.
  • Access to the tag on every domain in the journey, through Tag Manager or the site code.
  • A test journey you can complete, such as a booking or a low-value test order.

Allow an hour for a simple two-domain setup.

Longer if a third-party tool hosts part of the journey and its team has to add your tag.

Step 1: Map Every Domain the Journey Crosses

Start with a list, not the GA4 settings.

Walk each money journey on the live site and write down every domain the address bar shows:

Journey stage Typical domain Can you add your tag?
Main website example.co.uk Yes
Shop on a separate domain example-shop.com Usually yes
Booking widget page bookings-provider.com/example Sometimes, via its settings
Hosted payment page payments-provider.com Rarely
Customer portal portal.example.co.uk Yes (subdomain)

Each row ends up in one of three places:

  1. Cross-domain list for separate root domains where your tag runs.
  2. No action for subdomains of your main domain, in most cases (Step 4).
  3. Unwanted referrals for domains where you cannot add your tag (Step 5).

This map belongs in your GA4 measurement plan, so the next person knows why each domain is listed.

Step 2: Use the Same Google Tag on Every Domain

Cross-domain measurement only works if every page uses the same tag ID.

Google's cross-domain measurement guide states the requirement: the same G- tag ID, from the same web data stream, on every domain.

Common ways this goes wrong:

  • A second property on the shop. The shop was set up separately years ago, with its own measurement ID.
  • A booking tool with its own analytics field filled with a different property's ID.
  • Two web streams in one property, one per domain.

If you find any of these, fix them first. One property, one web stream, one G- ID across the whole journey.

In Tag Manager, that usually means the same Google tag published in each site's container, reading its ID from a constant variable so nobody can mistype it.

That is one of the Tag Manager best practices that pays off here.

Step 3: Add the Domains in Configure Your Domains

Now tell GA4 which domains belong together.

  1. Open Admin. Under Data collection and modification, click Data streams.
  2. Click Web, then select your web data stream.
  3. Click Configure tag settings, then Configure your domains.
  4. Accept any domains GA4 detected under Recommendations, or add a condition under "Include domains that match the following conditions".
  5. Choose a match type, enter the domain and save.

Add every root domain in the journey, including the main site itself.

Google allows up to 100 conditions, evaluated with OR logic, so one property can cover a lot of domains.

Pro tip: Use the simplest match type that covers the domain. A loose condition that matches more than you intended can add the linker parameter to links you never meant to touch.

There is a bonus once this is set.

Clicks to listed domains stop counting as outbound clicks in enhanced measurement, so your outbound click data gets cleaner too.

Step 4: Check Whether Subdomains Need Anything

Subdomains are where most people over-configure.

Google's cookie documentation explains the default: Google tags use automatic cookie domain configuration, which sets cookies on the highest-level domain possible.

Activity is then measured across subdomains without extra setup.

So www.example.co.uk and shop.example.co.uk normally share a visitor and a session already.

The exception is a custom cookie domain.

If someone set a specific cookie domain on one subdomain, visitors moving between subdomains can get new cookies and show up as self-referrals.

If your subdomains already share cookies, leave them alone.

If you see your own subdomain as a referral source, check the tag's cookie settings.

Making every subdomain use the same cookie domain is the fix Google's guide points to.

The way your site is split across domains also matters for SEO. My guide to ccTLDs, subfolders and subdomains covers that side.

Step 5: List Domains You Cannot Tag as Unwanted Referrals

Hosted payment pages are the classic case.

The visitor leaves your site, pays on the provider's domain and returns to your confirmation page.

Without help, GA4 sees the provider as the referrer and credits the sale to it.

You cannot add your tag to the provider's pages, so cross-domain measurement is not an option. Use unwanted referrals instead:

  1. In Admin, open Data streams and select your web stream.
  2. Click Configure tag settings, then Show all.
  3. Click List unwanted referrals.
  4. Add a condition for each payment or third-party domain, then save.

According to Google's unwanted referrals guide, GA4 then sets an ignore_referrer flag so the domain is not shown as a traffic source.

You can add up to 50 per web stream.

This is a common GA4 setup gap I find on stores and service sites that take deposits online.

Now prove it works.

Open your main site in a fresh browser window, accept analytics cookies, and click through to each listed domain.

Look at the destination URL. It should contain a _gl parameter, something like ?_gl=1*abc123*.... That parameter carries the visitor's identifiers to the next domain.

Test every route in the journey:

  • Plain links in the menu, buttons and body copy.
  • Forms that submit to the other domain.
  • Links back from the second domain to the first.

Google notes two things that can stop the parameter being added: navigation triggered by JavaScript, and scripts that call Event.stopPropagation().

Booking widgets and custom checkout buttons are the usual suspects.

Consent matters too. Cookies and identifiers are only set when there is consent, so test with cookies accepted, then repeat with them declined to see what your reports will miss.

If a tag will not fire as expected, Tag Assistant helps you debug Google Tag Manager step by step.

Step 7: Confirm the Fix in Your Reports

A _gl parameter in the URL is a good sign. The real test is the data.

Complete one real journey from a tracked campaign link, through to a booking or order. Then check:

  • DebugView shows your events from both domains under one device, in one session.
  • Traffic acquisition over the following weeks shows your own domains and payment providers falling out of the referral list.
  • Key events on the second domain carry the original source, not your own domain. If they do not yet fire reliably, start with how to set up key events in GA4.

Remember the change only applies from the day it goes live.

Past sessions stay split, which is one reason GA4 data does not match your booking or store figures for older months.

Common Cross-Domain Problems and Fixes

Symptom Likely cause Fix
Your own domain listed as a referral Domain missing from Configure your domains Add it and retest
No _gl in the destination URL JavaScript navigation or stopPropagation Ask the developer to use real links, or pass IDs manually
_gl present but sessions still split Different tag ID on the destination Use the same G- ID from the same stream
Payment provider credited with sales Provider not listed as an unwanted referral Add it under List unwanted referrals
Subdomain shown as a referral Custom cookie domain on one subdomain Restore automatic cookie domain settings
Engagement rate drops after checkout launch Extra short sessions from split journeys Fix cross-domain first, then reassess engagement rate

For a wider list of attribution faults, my GA4 audit checklist covers referrals, UTMs and the Google Ads link in one pass.

Test One Journey Today

Pick the journey that makes you money: a booking, an order, a quote request.

Walk it once, write down every domain, and check whether any of them appear as referral sources in GA4.

If they do, you know which step to start with.

If the journey crosses several domains and tools, I map and test it as part of a planned GA4 implementation, alongside the events and key events that depend on it.

Already set up and not sure it works?

A Google Analytics audit traces each hand-off and shows how much revenue it has been misattributing.

Frequently asked questions

Do I need cross-domain tracking for subdomains in GA4?

Usually not. Google's tag documentation says that with automatic cookie domain configuration, the default, activity is measured across subdomains without extra setup. You only need to act if someone has set a custom cookie domain on one subdomain, which can split sessions and create self-referrals. Check the cookie settings in your tag before adding subdomains to the domain list.

What is the _gl parameter in GA4?

The _gl parameter is what GA4 adds to links and form submissions that go to another domain in your cross-domain list. It carries the visitor's identifiers so the destination page can keep the same user and session instead of creating new cookies. Seeing _gl in the destination URL is the quickest sign that cross-domain measurement is working.

Should a payment provider be a cross-domain domain or an unwanted referral?

If you cannot put your Google tag on the payment pages, which is the case for most hosted payment providers, add the domain to unwanted referrals instead. That stops the provider being credited when the visitor returns to your confirmation page. Cross-domain measurement only makes sense for domains where your own tag runs.

Can cross-domain tracking fix data I have already collected?

No. GA4 applies the setting from the moment it goes live. Sessions that were already split, and sales already credited to a booking tool or payment provider, stay that way in your reports. Note the date you made the change so anyone reading trend charts knows when the attribution improved.

About the author

Kristijan Gjorgjioski

Independent SEO consultant · 6+ years in SEO · 60+ client websites worked on

I'm an independent SEO consultant with 6+ years in SEO. I run audits, migrations and content programmes for businesses in Europe, the UK and the USA, and I build the automation behind my own research.

Need help with ga4 setup?

Book a free 30-minute call. I look at your site first and tell you plainly what I would fix, and in what order.