Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Cross-domain linker (_gl) missing: how to find and fix it

CNV-362Medium impactDetectedBy FunnelGuardPublished Updated
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.

Where attribution is lost
  1. Ad clickSession starts on main site
  2. Product pageTracked correctly
  3. Link to checkout domainNo _gl added
  4. New session on checkoutSource becomes direct or self-referral
  5. 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.

Share of purchases credited to the right sourceExample numbers
Share of purchases credited to the right source (example)Without _gl: 35 %; With _gl: 92 %035713592Without _glWith _gl%

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

Manual check in about five minutes
  1. Open the first domain in a fresh window

    Use a private window and accept cookies so the Google tag can run.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

Set up cross-domain measurement by platform
  1. Open your Google tag

    In GTM, open the Google tag (or GA4 Configuration tag) that fires on all pages.

  2. Add domains to configure

    Under Configuration settings, add the parameter linker with the domains, for example yourshop.com, checkout.example.com. In newer containers, use Shared settings > Configure your domains.

  3. Use the same tag on every domain

    Make sure the container or tag with the same measurement ID also runs on the other domain.

  4. Preview and publish

    Use Preview mode, click the cross-domain link and check for _gl. Then publish.

gtag.js with the linker enabledjavascript
gtag('config', 'G-XXXXXXXXXX', {
  linker: {
    domains: ['yourshop.com', 'checkout.example.com'],
    accept_incoming: true
  }
});

How to confirm it's fixed

Fix confirmation
  • The link to the other domain contains _gl after 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 _gl value survives any redirect on the way
What changes in your reports

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.

Habits that help
  • 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.

Does FunnelGuard catch this?

Detected

FunnelGuard checks for this today.

How: cross_domain.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.