On this page
What this issue is
The cross-domain linker is a feature of Google tags (GA4 and Google Ads). When a visitor clicks a link or submits a form that goes to another domain you own, the tag adds a _gl parameter to the URL. It carries the visitor's client ID (the anonymous ID Google uses to recognise a browser) and session data.
Why it costs you leads or sales
Without _gl, the visit splits in two. The first part ends with an exit to another domain. The second part starts on the checkout or booking page as a new user, usually labelled direct or referral from your own site. The purchase or booking is then credited to the wrong source.
- Ad clickSession starts on main site
- Product pageTracked correctly
- Link to checkout domainNo _gl added
- New session on checkoutSource becomes direct or self-referral
- PurchaseCredited to the wrong source
The visitor arrives from an ad, but the handoff carries no _gl, so the conversion is not tied to the ad.
Example: illustrative numbers showing how attribution can look before and after cross-domain measurement is set up.
How to check if your site has it
Open the first domain in a fresh window
Use a private window and accept cookies so the Google tag can run.
Click the link or button to the other domain
Do not open it in a new tab by copying the address. Click it, so the tag can decorate the link.
Read the address bar on the new domain
Look for
?_gl=1*abc123*_ga*...in the URL. If there is no_gl, the linker did not run on that link.Check Tag Assistant
Connect Google Tag Assistant to both domains. Both should show the same Google tag ID, and the second domain should not report a new client ID.
Check GA4 reports
In Reports > Acquisition > Traffic acquisition, look for your own checkout domain listed as a referral source. That is a common sign.
How to fix it
The core fix is to tell your Google tag which domains belong together. Both domains must run the same GA4 property (same measurement ID), otherwise there is nothing to join.
Open your Google tag
In GTM, open the Google tag (or GA4 Configuration tag) that fires on all pages.
Add domains to configure
Under Configuration settings, add the parameter
linkerwith the domains, for exampleyourshop.com, checkout.example.com. In newer containers, use Shared settings > Configure your domains.Use the same tag on every domain
Make sure the container or tag with the same measurement ID also runs on the other domain.
Preview and publish
Use Preview mode, click the cross-domain link and check for
_gl. Then publish.
Configure domains in GA4
In GA4 go to Admin > Data streams > your web stream > Configure tag settings > Configure your domains. Add each domain with a match type such as 'Contains'.
Check how your tag is installed
If you use a plugin (for example Site Kit or a GA4 plugin), confirm it loads the standard Google tag so the GA4 setting applies. If the plugin has its own cross-domain option, use it.
Test a link
Click the link to the other domain and check for
_gl.
Add the checkout domain in GA4
In GA4 Admin > Data streams > Configure tag settings > Configure your domains, add your store domain and any other domain you link to, such as a booking tool.
Check the Google & YouTube channel or custom pixel
Shopify's own checkout runs inside its pixel sandbox. Confirm your Google tag is installed through the supported channel and test the handoff from the storefront.
Test with a real click
Go from a product page to checkout and look for
_glwhere a domain change happens.
Configure domains in GA4
Add every domain under Configure your domains in the GA4 data stream.
Install the same tag on both sites
In Webflow, go to Site settings > Integrations or Custom code and add the Google tag with the same measurement ID on both projects.
Use normal links
Links must be standard anchor links. Buttons built with scripts that change the address may skip the linker.
Add the same tracking code to funnels and sites
In each funnel or website, add the Google tag with the same measurement ID under Settings > Tracking code.
Configure domains in GA4
Add your funnel domain and main website domain in Configure your domains.
Test the handoff
Click through from one domain to the other and check for
_gl.
Add domains in GA4
Configure your domains in the GA4 data stream settings.
Connect the tag in Wix
In Marketing & SEO > Marketing Integrations, connect Google Analytics, or add a custom Google tag with Settings > Custom Code.
Test a link
Click through to the other domain and check the address for
_gl.
Add domains in GA4
List all your domains in GA4 under Configure your domains.
Use Code Injection for the tag
Under Settings > Developer Tools > Code Injection, make sure the same Google tag is present. Add it to the other site too.
Test
Click the cross-domain link and confirm
_glappears.
Add the linker setting to gtag
Add the
linkeroption to your config call, listing all domains, on every domain.Use normal links and forms
The linker decorates
<a>links and<form>actions. Redirects done in JavaScript after the click may skip it.Do not strip the parameter
Make sure the server or redirects keep
_glin the query string.
gtag('config', 'G-XXXXXXXXXX', {
linker: {
domains: ['yourshop.com', 'checkout.example.com'],
accept_incoming: true
}
});How to confirm it's fixed
- The link to the other domain contains
_glafter you click it - Tag Assistant shows the same client ID on both domains
- Both domains use the same GA4 measurement ID
- Your checkout or booking domain no longer appears as a referral in GA4
- A test conversion keeps the original source and medium
- The
_glvalue survives any redirect on the way
Without the linker
- Two sessions for one visit
- Checkout domain shown as referral
- Sales credited to direct
- Ad conversions under-reported
With the linker
- One continuous session
- Original campaign kept
- Sales credited to the right source
- Cleaner data for ad bidding
How to prevent it happening again
Cross-domain setups break quietly. A new checkout domain, a rebuilt button, a tag manager change or a redirect can remove _gl with no visible error. Nothing on the page looks wrong.
- Add any new domain to Configure your domains before launching it
- Re-test the handoff after theme, plugin or funnel builder changes
- Keep one measurement ID across all your domains
- Add the referral exclusion list entries if your provider needs them
- Note all your domains in one place so none are forgotten
How FunnelGuard handles this
FunnelGuard detects this issue today. Its robot visitor runs your real customer journey on a schedule, follows the step where the visitor moves to another domain, and checks whether the cross-domain linker value (_gl) is carried over on that handoff (check: cross_domain). If it is missing, the failure is re-checked from a second region before one alert goes out, with a screenshot and a likely cause.
Questions people ask
What is the _gl parameter in a URL?
It is a parameter that Google tags add to links between your own domains. It carries the visitor's client ID and session data so the second domain can continue the same visit instead of starting a new one.
Why is my _gl parameter not showing up on links?
Common causes are that the destination domain is not listed under 'Configure your domains', the Google tag is not on the page, consent was not granted, or the link is changed by a script after the click. Check these in that order with Tag Assistant.
Why does GA4 show my checkout domain as a referral?
Because the checkout domain started a new session without the original client ID. Setting up cross-domain measurement and listing the domain under Configure your domains usually removes the self-referral.
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 each domain. Use the same measurement ID on all domains, then click a link between them and check for _gl.
Do I need cross-domain tracking if I use a subdomain?
Usually not. Subdomains of the same registered domain share the Google cookie by default. Cross-domain setup is needed when the domains are different, such as yourshop.com and checkout-provider.com.
Can I use cross-domain tracking with a third-party checkout?
Only if you can run your Google tag with the same measurement ID there, or the provider supports passing the client ID. Check their documentation and test a real handoff to confirm.
Does _gl work if the visitor rejects cookies?
Often not. If analytics consent is denied, the tag may not add the value or may not read it. Test with consent granted, and follow your consent setup for how denied visitors are handled.
Related issues
- CNV-361Handoff to checkout/booking domain loses UTMsFix guide
- CNV-363Return URL from payment provider brokenFix guide
- CNV-364Subdomain cookie not shared, user logged outFix guide
- CNV-366Funnel builder custom domain disconnectedFix guide
- CNV-367Mixed brand domain confuses users (phishing look)Fix guide
- CNV-365Third-party domain SSL invalidFix guide