Cross-Domain Tracking for Landing Pages: GA4 Setup Guide visual workflow

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.

On this pageWhen you need itHow the _gl linker worksGA4 cross-domain setupGTM and Google Ads linkingReferral exclusionsHow to test itCommon errorsSources

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.

SetupExampleCross-domain needed?
Landing page on a separate campaign domain, form or checkout on the main sitesector150offers.in to developer.com/enquireYes
Main site sends visitors to a booking or application portal you control on another domaincollege.edu.in to admissions-portal.inYes, with the same GA4 tag on the portal
Landing page builder hosted on its own domainbrand.pagebuilder.io to brand.comYes, if you can add your GA4 tag to the builder
Subdomains of one domainlp.brand.com to www.brand.comUsually works by default; Google still recommends listing them
Payment gateway or third-party checkout you cannot tagRazorpay, PayU, CCAvenue pagesNo: list as an unwanted referral
Embedded third-party form in an iframeA Typeform or Google Form embedNot 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 _gl link copied into WhatsApp or bookmarked will not join sessions later, which is intended.
  • Forms are off by default in manual gtag setups: decorate_forms defaults to false.
  • The destination must accept it. accept_incoming is 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?

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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 _gl and 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 parameters
var 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?

  1. 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.
  2. 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.
  3. Compare the client ID. In browser developer tools, read the _ga cookie on both domains. The last two numbers (the client ID, e.g. 1234567890.1760160000) should be identical; the GA1.x prefix can differ.
  4. Open GA4 DebugView (with Tag Assistant). You should see one continuous stream: no new session_start and no first_visit when you arrive on the second domain.
  5. Submit a test lead and check, a day later in Explore, that the session's source/medium is facebook / paid-social with your test campaign name, not brandoffers.in / referral.
  6. 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.
  7. 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?

SymptomCauseFix
Your own landing domain shows as a top referral sourceDomain not listed, or tag missing on one sideAdd the domain; install the same G- ID on both
_gl present but new session startsDifferent measurement ID or a second property on the destinationOne stream, one ID across all domains
_gl missing after a form submitForms not decorated; JavaScript-posted formEnable form decoration, or pass parameters in the redirect
_gl lost after a redirectRedirect rebuilds the URL without the query stringPreserve all parameters in the redirect
Destination page errors with _glServer rejects unknown parametersWhitelist _gl or use fragment position
GA4 fine, Google Ads conversions missingConversion Linker not linking domainsConfigure Auto Link Domains and Enable linking across domains
Payment gateway shown as the lead or order sourceGateway not excludedAdd 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

FAQ

Common questions

What is cross-domain tracking in GA4?

Cross-domain tracking lets GA4 treat a visitor who moves between two or more of your own domains as one user in one session. The Google tag adds a _gl parameter to links and forms pointing to listed domains, carrying the first-party cookie values, and the destination tag reads them. Without it, the second domain records a new user and a referral from the first domain.

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

Install the same GA4 measurement ID from one web data stream on every domain. Then go to Admin, Data streams, select the web stream, Configure tag settings, Configure your domains, and add each domain as a condition. Save, then test by clicking from one domain to the other and checking the destination URL carries _gl and the session keeps its source.

What is the _gl parameter in a URL?

_gl is the linker parameter Google tags add when a visitor clicks from one configured domain to another. It carries the source domain's measurement cookie values so the destination continues the same user and session. Google says linker parameters expire after two minutes, so a link containing _gl that is shared or bookmarked will not join sessions later. It is safe to leave in the URL.

What is the difference between cross-domain tracking and referral exclusion?

Cross-domain tracking joins users and sessions across domains you tag with the same GA4 ID. Referral exclusion, called List unwanted referrals in GA4, only stops a domain being shown as a traffic source; it does not join cookies. Use cross-domain for your own landing, booking and portal domains, and unwanted referrals for untagged third parties such as payment gateways.

Do subdomains need cross-domain tracking in GA4?

Usually not for the cookie itself: with the default automatic cookie domain, lp.brand.com and www.brand.com share the GA4 cookie. Google still recommends adding subdomains to the domain list, because if one subdomain sets a different cookie domain, self-referrals appear in reports. Check that every subdomain uses the same measurement ID and cookie domain setting.

Need a practical growth system?

Book a review of your current acquisition, content and conversion workflow.

Book a Strategy Call
RS
Founder & Performance Marketing Lead, GrowthSparx

Rinku works across SEO, lead generation, paid acquisition and conversion systems for Indian and global businesses. This article uses practical operating frameworks, identifies limitations and links changing platform facts to primary sources.

Have a question? Message us directly on WhatsApp—usually a reply within a few hours.

Chat on WhatsApp