Short answer: Cross-domain tracking keeps one GA4 user and session when a visitor moves between your own domains, for example from a campaign landing page on brandoffers.in to the enquiry form on brand.com. Install the same GA4 measurement ID on every domain, add each domain under Admin, Data streams, Configure tag settings, Configure your domains, then confirm the _gl parameter appears on the destination URL and the session keeps its original source. Use "List unwanted referrals" only for third parties such as payment gateways, not as a substitute.
Need this done for you? GrowthSparx offers a fixed-scope lead tracking and attribution setup: GA4, Google Ads, Meta, WhatsApp, calls and CRM wired into one dashboard, usually live in 2–3 weeks.
When do landing pages need cross-domain tracking?
GA4 identifies a browser with a first-party cookie, and a cookie set on one domain cannot be read by another. When a visitor crosses from domain A to domain B, B sees a new user, starts a new session, and records domain A as the referrer. The original Google or Meta campaign disappears from the session that produced the lead.
| Setup | Example | Cross-domain needed? |
|---|---|---|
| Landing page on a separate campaign domain, form or checkout on the main site | sector150offers.in to developer.com/enquire | Yes |
| Main site sends visitors to a booking or application portal you control on another domain | college.edu.in to admissions-portal.in | Yes, with the same GA4 tag on the portal |
| Landing page builder hosted on its own domain | brand.pagebuilder.io to brand.com | Yes, if you can add your GA4 tag to the builder |
| Subdomains of one domain | lp.brand.com to www.brand.com | Usually works by default; Google still recommends listing them |
| Payment gateway or third-party checkout you cannot tag | Razorpay, PayU, CCAvenue pages | No: list as an unwanted referral |
| Embedded third-party form in an iframe | A Typeform or Google Form embed | Not solved by cross-domain; see our form tracking guide |
On subdomains: with the default automatic cookie domain, lp.brand.com and www.brand.com share the GA4 cookie. Google's cross-domain help page still recommends the setup for subdomains, because if one subdomain uses a different cookie domain, self-referrals appear. Adding them costs nothing.
Why this matters for lead generation in particular: if the session breaks, the generate_lead event on the second domain is credited to "Referral / sector150offers.in". GA4 then reports your best Google Ads campaign as producing no leads, and any bidding that uses GA4 key events learns the wrong lesson. The same break also loses the UTMs your CRM attribution fields depend on, unless they are carried separately.
How does the _gl linker parameter work?
When a visitor clicks a link (or submits a form) pointing to a domain on your list, the Google tag appends _gl to the destination URL, e.g. https://brand.com/enquire?_gl=1~abc123~. Per Google's cross-domain developer guide, it carries the source domain's first-party measurement cookie values, and the destination tag "extracts the first-party measurement cookie and stores it". The same user and session continue.
Four details from that guide that explain most failures:
- It expires in two minutes. "Linker parameters expire after two minutes", so the parameter is added at click time. A
_gllink copied into WhatsApp or bookmarked will not join sessions later, which is intended. - Forms are off by default in manual gtag setups:
decorate_formsdefaults tofalse. - The destination must accept it.
accept_incomingis true when the destination tag has domains configured; a destination that is not set up will ignore the parameter. - It can go after a
#(url_position: 'fragment') if a destination rejects unknown query parameters.
The GA4 help page adds that decoration depends on click events bubbling up to the document. Navigation triggered by JavaScript rather than a click, or scripts that call stopPropagation(), can stop _gl being added.
How do you set up GA4 cross-domain tracking?
- Use one web data stream and one measurement ID. Google requires the same
G-tag ID from the same web stream on every domain. Two properties, or two streams in one property, cannot be joined. - Install the tag on every domain, including the landing page builder, the booking portal and any microsite. If a domain cannot carry your tag, it cannot be part of the journey.
- Add the domains. Admin, Data collection and modification, Data streams, select the web stream, Configure tag settings, Configure your domains. Accept detected suggestions or add conditions manually (match type plus domain, e.g. "contains brandoffers.in"). You need Editor access; up to 100 conditions are allowed, joined with OR logic.
- Save and wait a few minutes, then test (below). No code change is needed when the sites use the Google tag or a GTM Google tag with the same ID.
- Handle redirects. If the landing page redirects (for example after a form posts to a script that redirects to
brand.com/thank-you), the redirect must keep_gland the UTMs. Google names stripped parameters on redirect as a main cause of failure.
Only for a hard-coded gtag.js implementation where you prefer code to the admin setting:
// Only if you cannot use the GA4 admin setting (e.g. a hard-coded gtag.js site)gtag('config', 'G-XXXXXXX', {linker: {domains: ['brandoffers.in', 'brand.com', 'book.brand-partner.com'],decorate_forms: true // needed when a form posts to the other domain}});
And for a server or JavaScript redirect you control, pass the query string through instead of building a fresh URL:
// Build the redirect URL on the landing domain, keeping all query parametersvar next = new URL('https://brand.com/thank-you');new URLSearchParams(location.search).forEach(function (v, k) {next.searchParams.set(k, v); // carries _gl, utm_*, gclid through the hop});location.href = next.toString();
Remember the two-minute expiry: this works for an immediate redirect, not for a link emailed later.
What about GTM and Google Ads click IDs?
If GA4 runs through GTM with a Google tag that uses the same measurement ID, the admin domain list above applies; you do not need a separate linker variable. Google Ads conversion tags are different: they read the GCLID from first-party cookies that GTM's Conversion Linker tag sets. Per the Conversion Linker help, the tag stores ad click information in cookies such as _gcl_aw on your domain, and for cross-domain journeys you can:
- tick Enable linking across domains on the destination so it reads incoming linker parameters;
- list the destination domains under Auto Link Domains on the source;
- set Decorate Forms to true if forms post across domains (only with URL position set to query parameter, because some browsers drop the fragment on form submission).
Without this, a Google Ads conversion tag firing on the second domain may not find the click and goes unrecorded, even when GA4 looks fine. If the lead is captured by your CRM and uploaded later, also carry the GCLID in a hidden field across the hop, as covered in tracking qualified leads from Google Ads to CRM.
When should you use referral exclusions instead?
GA4's List unwanted referrals (in the same Configure tag settings screen) tells GA4 not to show a domain as a traffic source, by adding ignore_referrer=true to matching events. It is for domains you do not tag but that send visitors back to you mid-journey:
- payment gateways (Razorpay, PayU, CCAvenue, bank 3-D Secure pages) on an ecommerce or fee-payment flow;
- email providers in password-reset or verification loops;
- third-party booking widgets that return the visitor to your thank-you page.
Limits and caveats: a maximum of 50 unwanted referrals per data stream; Editor role needed; and a returning user whose earlier session came from that domain before you excluded it can still be attributed to it under last non-direct click. Referral exclusion does not join users across domains. If you exclude brandoffers.in instead of setting up cross-domain, the second domain still sees a new user; it just shows the session as direct. Do not exclude real partners or portals that send you leads (99acres, Shiksha, Practo), or you lose their referral data.
How do you test cross-domain tracking?
- Start clean. Open a private window and land on the first domain with campaign tags, e.g.
?utm_source=facebook&utm_medium=paid-social&utm_campaign=xd-test-oct-2026. - Click the real CTA, not a typed URL. Check the destination URL contains
_gl=. If it does not, the link is built by JavaScript, the domain is missing from the list, or a script blocks propagation. - Compare the client ID. In browser developer tools, read the
_gacookie on both domains. The last two numbers (the client ID, e.g.1234567890.1760160000) should be identical; theGA1.xprefix can differ. - Open GA4 DebugView (with Tag Assistant). You should see one continuous stream: no new
session_startand nofirst_visitwhen you arrive on the second domain. - Submit a test lead and check, a day later in Explore, that the session's source/medium is
facebook / paid-socialwith your test campaign name, notbrandoffers.in / referral. - Repeat on mobile, through any redirect, and with consent declined and accepted if you run a consent banner. Also test a file download link if the page has one, as Google suggests.
- Check the referral report weekly for your own domains appearing as referrers. Any self-referral means a path that is not linked.
What are the most common cross-domain errors?
| Symptom | Cause | Fix |
|---|---|---|
| Your own landing domain shows as a top referral source | Domain not listed, or tag missing on one side | Add the domain; install the same G- ID on both |
_gl present but new session starts | Different measurement ID or a second property on the destination | One stream, one ID across all domains |
_gl missing after a form submit | Forms not decorated; JavaScript-posted form | Enable form decoration, or pass parameters in the redirect |
_gl lost after a redirect | Redirect rebuilds the URL without the query string | Preserve all parameters in the redirect |
Destination page errors with _gl | Server rejects unknown parameters | Whitelist _gl or use fragment position |
| GA4 fine, Google Ads conversions missing | Conversion Linker not linking domains | Configure Auto Link Domains and Enable linking across domains |
| Payment gateway shown as the lead or order source | Gateway not excluded | Add it to unwanted referrals |
If the fix requires moving the form onto the main domain, that is often the better answer: one domain, one cookie, nothing to link. We usually recommend it when building conversion-focused landing pages, and keep cross-domain for flows that genuinely need a second domain. For a full list of other places tracking breaks between ad click and CRM, see the lead tracking audit checklist.
Sources
- Google Analytics Help: Set up cross-domain measurement (admin steps, same tag ID, 100 conditions, redirects, verification)
- Google Tag Platform: Cross-domain measurement (_gl contents, two-minute expiry, decorate_forms, accept_incoming, url_position)
- Google Analytics Help: Identify unwanted referrals (ignore_referrer, 50-referral limit, use cases)
- Tag Manager Help: Conversion Linker (cross-domain settings for ad click cookies)