Sub topic 14
Cross-Domain Measurement Basics
Cross-domain measurement connects a user’s journey across two or more domains in one GA4 property. This chapter assumes that you already have a GA4 property and web data stream, know the stream’s measurement ID, and can edit the tags on each site.
When to use cross-domain measurement
Use cross-domain measurement when one journey moves between separate domains, such as:
www.example.comandshop.example.net- A marketing site and a separate checkout domain
- A booking site hosted by another domain
- Several related sites that belong to the same business
A subdomain such as shop.example.com may share cookies with www.example.com, depending on its configuration. Separate registrable domains, such as example.com and example-shop.com, require cross-domain configuration to preserve the journey reliably.
Cross-domain measurement does not merge separate GA4 properties. The sites should normally send data to the same web data stream and measurement ID when you want one continuous user journey.
How the linker works
GA4 uses the Google tag to pass an identifier between configured domains. When a visitor follows a qualifying link, the tag adds a linker parameter named _gl to the destination URL. The destination tag reads this value and continues the existing session and user information.
Configure the domains
In Google Analytics, open the web data stream and find the domain settings. The menu labels can change, but the usual path is:
- Open Admin.
- Select Data streams under the property.
- Select the web stream.
- Open Configure tag settings.
- Choose Configure your domains.
- Add each domain that should participate in the journey.
- Save the configuration.
Enter domains rather than complete page URLs. Include every domain that can appear in the journey. The Google tag must also be installed on every participating domain.
The standard tag on each site should use the same measurement ID:
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-XXXXXXXXXX');
</script>With Google Tag Manager, publish a Google tag on each domain and use the same measurement ID. A CMS integration should be configured the same way.
Test the handoff
Open the first domain in a private browser window. Click a link to the second domain and inspect the destination URL during navigation. The URL may briefly contain _gl. Then check the GA4 Realtime report and DebugView.
Common problems include:
- The tag is missing from one domain.
- The domains use different measurement IDs.
- A redirect removes
_gl. - Consent settings prevent the tag from storing or reading identifiers.
- The link opens through custom JavaScript that the tag cannot decorate.
- A third-party payment page is mistaken for a site you control.
An unwanted-referral rule can prevent a payment provider from appearing as a new source. It does not replace cross-domain measurement and does not join user journeys by itself.
Exercise
A visitor moves from www.example.com to checkout.example-pay.com, but GA4 reports a new referral session on the checkout site. Name two checks you should make first.
Show answer
Check that both domains use the same measurement ID and that both domains are listed in the web stream's configured domains. Then check whether a redirect or consent setting removes or blocks the _gl linker parameter.