- Cross-domain measurement keeps one visitor as one user when they move between domains you own, by passing their IDs in a _gl URL parameter on links and forms.
- Set it up in Admin → Data streams → Configure tag settings → Configure your domains, with the same GA4 tag on every domain.
- Subdomains don't need it, payment providers need unwanted referrals instead, and redirects that drop _gl are the most common reason it breaks.
GA4 cross-domain tracking (Google calls it cross-domain measurement) keeps a visitor as one user in one session when they move between domains you own: your site and a separate booking engine, a shop on another domain, a checkout hosted elsewhere.
Without it, GA4 treats the second domain as a brand-new visitor who arrived from your own site. Your sales get credited to "referral from yoursite.com", and the original Google Ads or newsletter click disappears. Setup takes five minutes. Making it actually work is mostly about avoiding a few predictable breakages.
What cross-domain measurement fixes
GA4 identifies a browser with first-party cookies, and cookies belong to one domain. Google's documentation puts it simply: without cross-domain measurement, new cookies with new IDs are created for each domain a user visits.
The symptoms of a missing setup are easy to spot once you know them:
- Self-referrals: your own domain appears as a referral source in Traffic acquisition.
- Conversions credited to the wrong place: purchases on the second domain show "referral" instead of the ad or email that brought the visitor.
- Inflated users: every visitor who crosses over is counted twice.
The 40-point GA4 audit worksheet
Every check in a printable worksheet, with where to look in GA4 and a priority for each one.
You'll also get the noxtag newsletter: one practical tracking fix every two weeks. Unsubscribe anytime.
How the _gl linker works
When cross-domain is configured, the Google tag watches for clicks on links and form submissions that point to another configured domain. It appends a _gl parameter to that URL, carrying the visitor's IDs. On the destination, the Google tag reads _gl and writes the same IDs into its own cookies. Google's developer docs describe it as sharing first-party measurement cookies between domains through that linker parameter.
Two things follow from this, and they explain most problems later:
- It only works for links and forms. Navigation done in JavaScript (
window.location = …) isn't decorated automatically. - The
_glparameter must survive the trip. Anything that strips query parameters on the way (a redirect, a URL normaliser) breaks the chain.
Do you need cross-domain, unwanted referrals, or nothing?
Cross-domain is often configured where it isn't needed and missed where it is. Use this decision guide first:
- Subdomains of the same site (
shop.site.comandwww.site.com): nothing to do. GA4 cookies are set on the top-level domain by default, so they're shared automatically. - A second domain you own and can tag (
site.com→site-booking.com): cross-domain measurement. - A payment provider you return from (PayPal, Stripe, Adyen): you can't put your tag on their pages, so list them as unwanted referrals instead. That stops the return trip from starting a new session.
- A booking or checkout widget in an iframe: the linker doesn't reach inside iframes. You'll need a manual handoff of the client ID, usually with the widget vendor's help.
- Two brands with separate GA4 properties: neither. Keep them apart, since IDs can't be shared across properties anyway.
How to set up cross-domain measurement
- Tag every domain with the same GA4 property. The same measurement ID must run on each domain in the journey, whether through GTM or gtag.js.
- Open the tag settings. Admin → Data streams → choose your web stream → Configure tag settings.
- Configure your domains. Add a condition for each domain (for example contains
site-booking.com). Conditions use OR logic, so list each domain once. Save. - Test the handoff, as described below.
If you use GTM, you don't need to change your Google tag: the setting lives in the GA4 interface and applies to the Google tag wherever it runs. Google recommends this interface setup over manual configuration.
How to test that it works
Don't trust the setting until you've watched it work:
- Open a page on domain A and click a real link to domain B (not a typed URL).
- Check the destination URL: it should contain
?_gl=1~…. - In DevTools → Application → Cookies, compare the
_gacookie on both domains. The client ID (the two numbers at the end of the value) should be identical. - In GA4 DebugView (or GTM Preview), confirm the events on domain B belong to the same session as domain A. Our DebugView guide covers how to get debug mode running.
- A week later, check Traffic acquisition: your own domain should have disappeared as a referral source.
Quick test without DevTools: if the _gl parameter is in the URL when you land on domain B, the sending side works. If it's there but users still double up, the problem is on the receiving side (tag missing, consent denied, or a different property).
Is your GA4 & GTM setup collecting the right data?
Get a senior review of your tags, triggers, data layer and consent setup, with a prioritized fix list your developers can act on.
Why cross-domain stops working
- A redirect drops
_gl. Domain B redirects/bookto/book/or to a language version and loses the query string. Google's guidance is to preserve the_glparameter in redirects. - JavaScript navigation. Buttons that send people across with
window.locationinstead of a link aren't decorated. Turn them into real links, or decorate the URL manually. - Click handlers block the listener. The linker listens for clicks at the document level. A script that stops event propagation on a link (some sliders, modals and SPA routers do) prevents decoration.
- Different GA4 properties. Cross-domain only joins domains that send to the same property.
- A custom cookie prefix or name on one side. The linker expects the default
_gacookies. - Consent denied on domain B. If analytics consent isn't granted on the destination, no cookie gets written, so there's nothing to keep. Make sure your consent banner shares the choice across domains, or asks again.
Further reading: GA4 Unassigned traffic: what it means and how to fix it. Broken cross-domain setups are a common source of self-referrals and misattributed sessions.
Frequently asked questions
What is cross-domain tracking in GA4?
It's a setting that keeps a visitor as the same user and session when they move between domains you own. The Google tag adds a _gl parameter to links and forms between configured domains, and the destination reads it to reuse the same IDs.
Do I need cross-domain tracking for subdomains in GA4?
No. GA4 sets its cookies on the top-level domain by default, so subdomains like shop.example.com and www.example.com already share the same user. Cross-domain measurement is only needed for different domains.
Should PayPal or Stripe be added to cross-domain measurement?
No. You can't run your tag on a payment provider's pages, so add them to the unwanted referrals list instead. That keeps the visitor's return from payment in the original session.
How do I check if GA4 cross-domain tracking is working?
Click a link from one domain to the other and check that the URL contains a _gl parameter, then compare the _ga cookie value on both domains: it should be identical. In reports, your own domain should stop appearing as a referral source.
Why is the _gl parameter missing from my links?
Usually the destination domain isn't listed in Configure your domains, the navigation uses JavaScript instead of a link, or a script stops click events from reaching the Google tag's listener. Check the domain conditions first, then the link itself.
One journey, one user
Cross-domain measurement is a small setting with a large effect on attribution: it decides whether your bookings and purchases are credited to the campaigns that drove them or to your own website. Set it up, test it with a real click, and re-test after any change to the second domain's redirects or consent banner.
If your journey spans several domains, a booking engine or an embedded checkout, our GA4 & GTM audit traces the full path, including the parts that need a manual handoff.