On this page
What this issue is
When a visitor moves from www.example.com to another domain, such as checkout.example-shop.com or a hosted booking page, browser cookies do not travel with them. Cookies belong to one domain. Google Analytics 4 (GA4) solves this with a linker parameter called _gl. The Google tag adds it to the link URL, and the tag on the next domain reads it and reuses the same client ID.
- Ad clickVisitor lands with gclid and UTMs
- Landing pageSession starts, source recorded
- Link to checkout domainNo _gl added to the URL
- Checkout / bookingNew client ID, new session
- Purchase or bookingCredited to direct or referral
The link to the second domain has no _gl, so everything after it is attributed to the wrong source.
Why it costs you leads or sales
It also affects ad platforms. If Google Ads imports GA4 conversions, the lost session means fewer conversions reach the bidding algorithm, which gets less data to learn from.
The visitor arrives with a source, crosses to another domain without _gl, and arrives as a stranger.
Example: the same 100 paid-search purchases reported before and after the linker is fixed. Numbers are illustrative.
How to check if your site has it
Open your landing page in a clean window
Use a private window and add a test tag such as ?utm_source=test&utm_medium=check to the URL. Accept cookies if a banner appears, because the linker usually waits for analytics consent.
Click the link to the other domain
Click your Buy, Book now or Apply button that leads to the checkout, booking or form domain.
Read the address bar
Look for
_gl=followed by a long string. If it is missing, the linker did not run on that link.Check GA4 in Realtime or DebugView
If the visit shows as a new user with no source on the second domain, the client ID was not carried over.
Check the settings
In GA4 go to Admin > Data streams > your web stream > Configure tag settings > Configure your domains. Every domain the visitor passes through must be listed.
How to fix it
The fix is the same in principle everywhere: tell the Google tag which domains belong together, and make sure the tag is on both domains. The place you do it depends on how your tags are installed.
Open your Google tag
In Tags, open the Google tag (or the GA4 Configuration tag) that fires on all pages.
Add the domains
Under Configuration settings, add the parameter
linkerwith the domains, or use Shared settings > Configure your domains. Add each domain, for exampleexample.comandbook.example-tool.com.Enable URL decoration if needed
Turn on Decorate forms only if you have GET forms that go to another domain.
Preview and publish
Use Preview mode, click through to the other domain, confirm
_glis in the URL, then publish.
Set it in GA4 first
In GA4: Admin > Data streams > Configure tag settings > Configure your domains. Add every domain with the Contains or Exactly matches condition.
Check your plugin
If you use Site Kit, GTM4WP or a similar plugin, make sure the GA4 tag is output on every page and that the plugin is not loading it after the footer links render.
Install the tag on the other domain
The same GA4 property must run on the destination site, otherwise nothing reads _gl.
Add the domains in GA4
Use Admin > Data streams > Configure tag settings > Configure your domains and list your store domain, the myshopify.com checkout domain if it is used, and any other domain involved.
Check how the tag is installed
If you use the Google & YouTube app, check its settings. If the GA4 tag is hard-coded in the theme, it must load on all pages, including the cart.
Test the cart to checkout link
Add a product, click Checkout and look for
_glif the checkout is on a different domain from the store.
Use the GA4 setting
Add domains in GA4 under Configure your domains. Webflow's own Google Analytics field only takes a Measurement ID, so use Google Tag Manager or custom code for the linker setting.
Add the tag in custom code
In Project settings > Custom code > Head code, add the config call from the snippet below.
Add the tracking code to funnels and sites
Put your Google tag or GTM container in the funnel or website Settings > Tracking code (Head) on every page.
List the custom domains
Add each funnel domain and any booking domain in GA4 under Configure your domains, then test the link between them.
Install the tag
In Marketing integrations or Settings > Custom code, add your Google tag or GTM container to all pages.
Add the domains
List all domains in GA4 under Configure your domains, then check the link to any external booking or checkout page.
Add the code
Go to Settings > Advanced > Code injection and add the Google tag with the linker setting from the snippet below to the Header.
List the domains in GA4
Add the other domain under Configure your domains and test the external link.
Add the linker to the config call
Use the gtag.js snippet below on every page of every domain.
Make sure links exist when the tag runs
Links added by JavaScript after the page loads are still decorated on click, but only if the tag is already loaded at that moment.
<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');
gtag('set', 'linker', {
'domains': ['example.com', 'book.example-tool.com'],
'accept_incoming': true
});
</script>How to confirm it's fixed
- The link to the other domain now contains
_gl=in the address bar. - GA4 DebugView shows the same client ID on both domains.
- The conversion on the second domain is credited to the original source and medium, not direct or your own domain.
- Your own domains do not appear in the Traffic acquisition report as referrals.
- The test works for every entry point: header link, button, embedded widget and any form.
How to prevent it happening again
This breaks when someone adds a new booking tool, changes the checkout domain, switches tag manager or edits the consent setup. Keep a short list of all domains in the funnel and review it whenever one changes.
- Keep a list of every domain a customer can pass through, from ad click to thank-you page.
- Update Configure your domains and referral exclusions whenever a new domain is added.
- Re-test the journey after changes to GTM, the theme, the consent banner or the booking or checkout tool.
- Check that the tag is installed on the destination domain too.
- Run an automated check on a schedule instead of relying on spot checks.
How FunnelGuard handles this
FunnelGuard detects this issue today. A robot visitor runs your real journey on a schedule, follows the link to the second domain and checks whether the cross-domain _gl parameter is present on the outgoing URL. If it is missing, the check fails.
A failure is re-checked from a second region before one alert goes out by email, Slack, Teams, WhatsApp, webhook or PagerDuty, with a screenshot and a likely cause. The check finds that the parameter is missing; you still make the settings change yourself. Test traffic is marked (utm_source=funnelguard, fg_test=1) and never clicks real ads. The Free plan covers 1 site and 2 journeys with daily checks, no card needed, and paid plans have a 3-day free trial.
Questions people ask
What is the _gl parameter in Google Analytics?
The _gl parameter is a linker parameter that Google's tags add to URLs when a visitor moves between domains. It carries the client ID so GA4 can treat both visits as one session. Without it, the second domain starts a new visitor.
Why is my _gl parameter not showing in the URL?
The usual reasons are that the destination domain is not listed under Configure your domains, the Google tag was not loaded when the link was clicked, or the visitor has not granted analytics consent. Forms that submit by POST also cannot carry it. Check the domain list first.
How do I set up cross-domain tracking in GA4?
In GA4, go to Admin > Data streams > your web stream > Configure tag settings > Configure your domains and add every domain. Make sure the same GA4 tag runs on all of them. Then click through and check that _gl appears in the URL.
Why does my checkout domain show as a referral in GA4?
This happens when the session restarts on the checkout domain because the client ID was not passed. GA4 then sees the visit coming from your main site. Fix the cross-domain setting and add the domains to the list of unwanted referrals.
Does the _gl parameter work if the visitor rejects cookies?
Not reliably. If analytics storage is denied, the Google tag does not set the identifiers it needs, so the linker may not add useful values. This is expected and depends on your consent setup.
Can I use _gl with a form that posts to another domain?
No, a POST form does not put parameters in the URL, so the linker cannot decorate it. You can switch the form to GET if that is safe, or pass the client ID in a hidden field.
How can I monitor whether _gl is still being added?
You can test by hand after every change, or use synthetic monitoring. FunnelGuard runs your journey on a schedule and checks whether _gl is present on the link to the other domain, then alerts you if it is not.
Related issues
- TRK-313UTMs lost crossing to checkout / booking domainFix guide
- TRK-315_gl parameter stripped by destination redirectFix guide
- TRK-316Cross-domain domains list missing the booking toolFix guide
- TRK-327Thank-you page on another domain starts new sessionFix guide
- TRK-311UTMs lost on redirect (http->https, www, trailing slash)Fix guide
- TRK-326Payment gateway (PayPal/Stripe) shown as referral sourceFix guide