GA4 cross-domain tracking: set it up for two sites
If your visitors move between two domains you own, say a marketing site on brand.in and a booking engine or store on brand-shop.com, GA4 counts them as two different users unless you turn on cross-domain measurement. You set it up in GA4 Admin in about five minutes. You then check it by looking for a _gl parameter in the destination URL. Until you do, your second domain shows its own site as a referral source, and your Google Ads and Meta conversions lose the original source.
Why two domains break your numbers
GA4 identifies a browser with first-party cookies, and each root domain gets its own cookies. When someone clicks from brand.in to brand-shop.com, the second site can't read the first site's cookies. It creates a new client ID and a new session. Google's help article puts it plainly: without the feature, one person counts as two users.
In practice this shows up as:
- brand.in listed as a top referral on the destination domain
- purchases or leads credited to "referral" instead of Google Ads, Meta or organic
- more users than real people, and session counts that look high for the traffic you buy
This is the same symptom we covered in Razorpay showing as a referral in GA4. The cross-domain case is different because you own both domains and want them joined into one journey, not just hidden.
Typical Indian setups that need it: a real-estate developer with a project microsite and a separate enquiry portal, a hotel using a third-party booking engine on its own domain, a D2C brand running a content blog on one domain and Shopify on another, and an edtech brand whose payment or enrolment page sits on a different domain.
Before you start: one tag ID on every domain
Cross-domain only works when every domain sends data to the same web data stream with the same "G-" tag ID. If the booking engine has its own GA4 property, the setting can't join the two. Ask the vendor to install your G- ID, or to give you access to add it through their tag manager.
Also check:
- you have Editor access or higher
- subdomains (shop.brand.in) don't need cross-domain at all, because they share the root domain's cookies. They only need consistent cookie domain settings.
How to set it up in GA4 Admin
Google calls this the recommended method:
- Go to Admin → Data collection and modification → Data streams.
- Click Web, then your web data stream.
- Scroll down and click Configure tag settings.
- Under Settings, click Configure your domains.
- GA4 may already list domains it has seen using the same tag under Recommendations. Click Add for each one that's yours.
- To add one manually, click Add condition, choose a match type and enter the domain, for example
brand-shop.com. Add every domain in the journey, including the one you're starting from. - Click Save.
You can add up to 100 conditions, and GA4 treats them as "any of these". After you save, the Google tag adds the _gl parameter to links and form submissions that go to the listed domains. The destination page reads it and keeps the same user and session.
If you use Google Tag Manager
Google's article doesn't cover GTM separately. Our reading is that if GTM fires the same Google tag (the same G- ID) on both domains, the Admin setting applies to it as well, because the domain list lives in the tag settings, not in the container. Check this with the test below rather than assuming it. Google's tag ID help page explains how to confirm which ID your GTM tag is loading.
Test it in two minutes
- Open a page on domain A in a normal browser window, not one with an ad blocker.
- Click a link, or submit a form, that goes to domain B.
- Check that the URL on domain B contains
?_gl=1*...(or&_gl=after other parameters). - Open GA4 Realtime and confirm one user, not two, with the original traffic source intact.
If _gl isn't there, check three things in this order:
- The domain string doesn't match. www, a country domain or a typo means the link isn't treated as cross-domain.
- A redirect strips query parameters. Many booking engines and payment pages redirect from a short URL to a long one and drop anything they don't recognise. Use Chrome DevTools → Network to watch each hop. Then ask the vendor to keep arbitrary parameters through the redirect.
- The link is fired by JavaScript. Google notes that navigation started by a script rather than a direct click, or a script that calls
stopPropagation()on the click, can stop the linker from decorating the URL. "Book now" buttons built asonclick="window.location=..."are the usual problem.
Also list the domains as unwanted referrals
Cross-domain and referral exclusion are two different settings, and most two-domain setups need both. List unwanted referrals is at the same place: Data streams → your web stream → Configure tag settings → Show all → List unwanted referrals.
According to Google's unwanted referrals article, GA4 then adds ignore_referrer=true to matching events, so those domains stop appearing as sources. You can add up to 50 per stream. Use it for:
- your own second domain, as a safety net for links the linker misses
- payment gateways such as Razorpay, PayU or CCAvenue, which you don't want to join, just ignore
One caveat: a returning user who first arrived from an excluded domain may still be credited to it, because of GA4's last non-direct click attribution and the lookback window.
What to do this week
- [ ] List every domain in your customer journey: site, blog, store, booking engine, enquiry portal.
- [ ] Confirm each one loads the same G- tag ID. Fix vendor-owned domains first.
- [ ] Add all domains under Configure your domains and save.
- [ ] Click from domain A to B and check for
_glin the URL. - [ ] Trace any redirect hops that drop
_gland raise them with the vendor. - [ ] Add payment gateways and your own domains under List unwanted referrals.
- [ ] After a week, compare referral traffic and Unassigned sessions with the week before. Our guide to unassigned traffic in GA4 helps here.
FAQ
Do I need cross-domain tracking for subdomains?
No. blog.brand.in and www.brand.in share the root domain's cookies. Google mentions self-referrals between subdomains only when their cookie domain settings differ.
Will it fix past data?
No. It only affects data collected after you save the setting. Mark the date in your reports so a sudden drop in referrals isn't misread.
Does the _gl parameter hurt SEO?
It's added only when someone clicks a link, not to the URLs Google crawls in your sitemap. Keep self-referencing canonical tags on destination pages so any shared _gl URLs point back to the clean version. If landing pages then show "(not set)", see (not set) landing page in GA4.