Guide 138 · Setup · GA4 + Tag Manager
Set up cross-domain measurement: one user, one session across two domains
Cookies stop at the domain boundary. Without cross-domain measurement, a visitor who moves from the shop to the checkout domain is counted as two users in two sessions, and the sale is credited to a direct visit instead of the campaign that brought them. Cross-domain measurement fixes it by passing the cookie IDs in a _gl URL parameter when the visitor crosses over. This guide sets it up in Admin, no code required.
After step 5, a click from the first domain to the second lands on a URL carrying the _gl linker parameter, and the two domains report one user in one session.
Download the reference: the cross-domain measurement reference (JSON) (991 bytes, MD5 badc27267958d8fad27121bad11f9e02). The cross-domain setup from Google's help page, with the counts recomputed: up to 100 conditions, and 2 users and 2 sessions without it versus 1 and 1 with it.
What you need
- Two or more domains you control. Cross-domain measurement is for domains the same business owns, such as a shop and a separate checkout domain.
- The same Google tag on every domain. The tag on each page must use the same tag ID, the same G- ID, from the same web data stream.
- The Editor role or above on the Analytics account. Google requires Editor or above to set up cross-domain measurement, and you can create up to 100 conditions.
The trace
- Check the tag on every domain. Before touching Admin, confirm the tag on each domain uses the same tag ID from the same web data stream. Two domains on two different properties cannot share a session, whatever the settings say.
- Open the stream. In Admin, under Data collection and modification, click Data streams. Click Web, then click the web data stream.
- Open Configure your domains. In the web stream details, click Configure tag settings at the bottom. In the Settings section, click Configure your domains.
- Add the domains. If the same Google tag runs across the domains, they are automatically detected and show up in the Recommendations section — click Add to accept one. To add a domain by hand, click Add condition under Include domains that match the following conditions, choose a match type, and enter the domain. Conditions are evaluated using OR logic, so a visitor matching any one condition is covered. You can create up to 100 conditions, and an example property with 2 domains uses 2 of them, leaving 100 − 2 = 98 unused.
- Save. Click Save. From now on, outbound clicks that would ordinarily trigger an event via enhanced measurement are ignored when the link leads to a domain in the list, because the click is not a visitor leaving — it is the same visitor continuing.
- Verify with the
_glparameter. Open a page with a link to the configured domain, click the link, and check the URL on the destination domain. It must contain the linker parameter_gl, for examplehttps://www.example.com/?_gl=1*abcde5*. If the_glparameter is missing, check that the domain in the settings matches the domain the link actually points to. - Count the difference. Without cross-domain measurement, one user visiting two root domains is identified separately: 2 users and 2 sessions instead of 1 user and 1 session. With it, the cookies keep the same IDs as they pass through the
_glparameter, and Analytics identifies just 1 user and 1 session. The setup is worth 2 − 1 = 1 session saved per crossing visitor.
Dead ends
DEAD END — SETTING IT UP FOR SUBDOMAINS THAT DO NOT NEED IT. Subdomains of the same domain share the root-domain cookie by default, so blog.example.com and www.example.com are already one journey. Google recommends the cross-domain setup for subdomains only when different cookie domains cause self-referrals. Read the subdomain guide before adding conditions for subdomains.
DEAD END — ADDING A DOMAIN THE TAG DOES NOT COVER. Both domains must carry the same tag ID from the same stream. A condition for a domain with no tag, or with a different property's tag, does nothing — the _gl parameter has no tag on the other side to read it.
DEAD END — LOSING THE LINKER PARAMETER IN A REDIRECT. If the destination page redirects or strips arbitrary query parameters, the _gl parameter can be removed before Analytics reads it. Configure the site to preserve _gl in redirects, and confirm with the browser's developer tools that the parameter survives the hop.
End state
The domains are listed in Configure your domains, the same tag ID runs on all of them, and a crossing visitor arrives with _gl in the URL. The reports show one user and one session for the whole journey, and outbound click events no longer fire for links between the listed domains.
Sources
- Analytics Help — [GA4] Set up cross-domain measurement — the cookie and
_glmechanism, the Admin setup steps, the 100-condition limit, OR logic for conditions, and the_glverification check - Analytics Help — Enhanced measurement events — outbound click events do not fire for links to domains configured for cross-domain measurement
Checked 11 November 2026. The steps, the limit, and the _gl check above are the ones in Google's cross-domain measurement page, opened 11 November 2026. No step in this guide was run inside a live Analytics property, because that needs a Google sign-in and this site does not sign in as anyone. The reference file was checked in Python: its figures were recomputed from the documentation values and match the numbers on this page. Google moves menu items without warning; if a path on this page no longer matches, the linked help page is the current map.