Fortunitus Check your tracking

GA4 cross-domain tracking: how to measure one visit across two domains

If visitors move from your website to a shop, booking or payment page on another domain you own, GA4 counts them twice and gives the sale to your own site as a referral. Cross-domain measurement fixes that by carrying the visitor's ID across in a _gl parameter. In 2026 the setting sits in the new Google tag settings, and GA4 may already suggest the domains.

Short answer: make sure both domains load the same GA4 tag (the same G- ID), then in GA4 go to Admin → Data streams, open the web stream, click Configure tag settings → Configure your domains, add each domain and save. GA4 then appends a _gl parameter to links and forms between those domains so the visitor keeps one user ID and one session. Test it by clicking a link and checking that the destination URL contains ?_gl=.

Why do you need cross-domain measurement?

Without cross-domain measurement one visitor across example.com and shop-example.com counts as 2 users and 2 sessions and the sale goes to example.com / referral; with it, 1 user, 1 session and the original source keeps the sale.

GA4 identifies visitors with first-party cookies, and each root domain has its own. When someone goes from example.com to shop-example.com, the shop sees a new visitor whose referrer is your own site. Google's help page says this produces two users and two sessions instead of one. The worse effect is attribution: the purchase is credited to example.com / referral, and the Google Ads click that started the visit loses it.

You need it for a separate shop or booking domain, a different country domain in the same flow, or a landing page builder on its own domain. You do not need it for subdomains such as shop.example.com: GA4 sets its cookie on the root domain by default, so subdomains share it. For payment providers you do not own, use unwanted referrals instead.

How to set up cross-domain measurement

  1. Check that every page on both domains loads the Google tag with the same G- ID from the same web data stream. Our tracking checker shows the ID on each site.
  2. In GA4 go to Admin → Data streams, click the web stream, then Configure tag settings at the bottom. In 2026 this opens the Google tag settings as a Tag Manager panel.
  3. Open Settings → Configure your domains.

The screen warns that the feature works by adding parameters to your URLs (1). If the same tag already runs on several domains, GA4 lists them under Suggested domains; click Accept suggestion to add one (2):

GA4 Configure your domains screen with a warning that cross-domain measurement appends parameters to URLs and a suggested domain fortunitus.com with an Accept suggestion button.
Configure your domains for the fortunitus.com stream, November 2026. 1: the warning about URL parameters. 2: a suggested domain.

To add domains yourself, click Add condition, keep Contains and type each domain (1), then Save (2). Conditions use OR logic and Google allows up to 100.

Configure your domains with two conditions: Contains example.com and Contains shop-example.com, and the Save button.
1: two example conditions. 2: Save. We typed these for the screenshot and closed without saving.

Add your main domain too, not only the second one. The list also tells GA4 which links are internal, so clicks between your domains stop being counted as outbound clicks in enhanced measurement.

How to test that it works

  1. Open a page on the first domain and accept cookies.
  2. Click a link or submit a form that leads to the second domain.
  3. Look at the address bar on the destination. It should contain a parameter like ?_gl=1*abc123*….
  4. Check that the page loaded normally. Google warns that in rare cases a server rejects unknown parameters.
  5. In GTM Preview or DebugView, confirm the session continues and no new session_start fires with your own domain as referrer.

When the _gl parameter disappears

  • Redirects. If the destination redirects (for example from http to https or to a language folder) and drops query parameters, _gl is lost. Configure the redirect to keep it.
  • JavaScript navigation. GA4 adds _gl when a link is clicked or a form is submitted. Buttons that change window.location in a script are not decorated.
  • Consent. Without analytics consent there are no cookie IDs to pass on, so cross-domain measurement has nothing to carry.
  • Different tags. If the shop uses another GA4 property or stream, the IDs do not connect. One stream, one ID.

After the change, watch referral traffic from your own domains: it should drop to almost zero for new data. Old sessions keep their source.

Frequently asked questions

How do I set up cross-domain tracking in GA4?

Make sure both domains use the same GA4 tag ID. In GA4 Admin open Data streams, the web stream, Configure tag settings, then Configure your domains. Add each domain as a condition and save.

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

Usually not. GA4 sets its cookie on the root domain by default, so shop.example.com and example.com share it. Cross-domain measurement is for different root domains.

What is the _gl parameter?

A URL parameter GA4 adds to links and forms between domains in your cross-domain list. It carries the client and session IDs so the destination domain can continue the same user and session.

Why is my own domain showing as a referral in GA4?

Usually because visitors move to another domain you own without cross-domain measurement, or because some pages lack the Google tag. Add both domains to Configure your domains and check that every page is tagged.

Why is the _gl parameter missing from the URL?

Common causes are redirects that drop query parameters, navigation done by JavaScript instead of a link or form, missing consent, or a domain that is not in the cross-domain list.

Check your own setup in 20 seconds

Run any website through the free tracking checker: GA4, Google Tag Manager, Google Ads, Meta Pixel, cookie banner and what sits inside the GTM container.