On this page
What this issue is
Many funnels start on one domain (your marketing site or landing page) and finish on another (a hosted checkout, a booking tool or a funnel builder domain). UTMs are the utm_source, utm_medium and utm_campaign tags in a URL. They tell analytics where a visitor came from. Click IDs such as gclid (Google Ads) and fbclid (Meta) do the same job for ad platforms.
- Ad clickURL has utm_source and gclid
- Landing pageParameters present, page view tracked
- Handoff linkPoints to checkout domain with no query string
- Checkout / bookingArrives as direct traffic
- Purchase eventCredited to no campaign
The ad click is tracked on the first domain, then the handoff link drops the parameters.
Why it costs you leads or sales
Example: share of paid-campaign purchases that keep their source, before and after fixing the handoff.
How to check if your site has it
Build a tagged URL
Open your landing page with
?utm_source=test&utm_medium=cpc&utm_campaign=handoff&gclid=test123added.Click the checkout or booking button
Use the real button a customer would use.
Read the address bar on the new domain
If the UTMs and gclid are gone, the handoff drops them.
Check for redirects
In browser DevTools, Network tab, tick Preserve log and follow each redirect. A 301 or 302 that omits the query string is a common cause.
Check the analytics report
In GA4 Realtime or DebugView, see whether the purchase session carries your test source or shows direct.
How to fix it
Check your button plugin or theme
Some builders have a setting such as 'pass query string' on button links. Enable it if present.
Otherwise add the script below
Add it with a header and footer plugin, or your theme's custom code area, and change the domain list.
Check the domain setup
Keep checkout on your primary domain if you can, as then no handoff is needed. Under Settings > Domains, make sure the primary domain is the one used in ads.
For external booking or landing pages
Add the script below to theme.liquid before the closing body tag.
Configure domains in the GA4 tag
In your Google tag settings, add both domains under Configure your domains so GA4 adds the _gl linker parameter.
Or use a Custom HTML tag
Fire the script below on All Pages.
Add custom code
Paste the script below in Project Settings > Custom Code > Footer Code, then publish.
Check the redirect or button link
If the link goes to another domain, add the parameters with the funnel's custom code area (Settings > Tracking Code) using the script below.
Add custom code
Under Settings > Custom Code, paste the script below into the Body end of all pages. This needs a premium plan.
Use code injection
Under Settings > Advanced > Code Injection, paste the script in the Footer.
Add the script or rewrite redirects
Use the script below, and make server redirects keep the query string (for example, nginx
return 301 https://checkout.example.com$request_uri;keeps it when you use $is_args$args).
(function () {
var targets = ['checkout.example.com', 'book.example.com']; // change these
var keys = ['utm_source','utm_medium','utm_campaign','utm_term','utm_content','gclid','fbclid','msclkid','ttclid'];
var current = new URLSearchParams(window.location.search);
var saved = {};
try { saved = JSON.parse(sessionStorage.getItem('campaign') || '{}'); } catch (e) {}
keys.forEach(function (k) { if (current.get(k)) saved[k] = current.get(k); });
try { sessionStorage.setItem('campaign', JSON.stringify(saved)); } catch (e) {}
document.addEventListener('click', function (e) {
var a = e.target.closest && e.target.closest('a[href]');
if (!a) return;
var url;
try { url = new URL(a.href); } catch (err) { return; }
if (targets.indexOf(url.hostname) === -1) return;
Object.keys(saved).forEach(function (k) {
if (!url.searchParams.has(k)) url.searchParams.set(k, saved[k]);
});
a.href = url.toString();
}, true);
})();location /book {
return 301 https://book.example.com/start$is_args$args;
}How to confirm it's fixed
- Open the landing page with a tagged URL and click the handoff button.
- The checkout or booking URL shows the same UTMs and click ID.
- The session in GA4 keeps the test source and does not start as direct.
- A test purchase or booking carries the campaign in your CRM or order data.
- Redirects in the Network tab all keep the query string.
How to prevent it happening again
How FunnelGuard handles this
Questions people ask
Why are my UTMs missing on my checkout page?
The link or redirect to the checkout domain probably does not carry the query string. Redirects that rewrite the URL, buttons with hard-coded links and hosted checkouts are common causes. Test with a tagged URL and read the address bar after the click.
Why do my sales show as direct traffic in GA4?
When campaign data is lost at a domain handoff, GA4 sees the checkout visit with no source and may start a new session. The sale is then credited to direct. Passing parameters and setting up cross-domain measurement usually fixes it.
How do I pass UTM parameters to another domain?
Add the UTMs and click IDs to the link that points to the other domain. You can do this with a small script that appends saved parameters to links, or with a platform setting that passes the query string. Server redirects must also keep the query string.
Do UTMs and the _gl parameter do the same thing?
No. UTMs describe the campaign. The _gl parameter carries the Google Analytics client ID so GA4 can link sessions across domains. You usually need both to keep attribution intact.
Does a 301 redirect remove UTM parameters?
Not by itself, but many redirect rules are written without the query string and so drop it. In nginx, use $is_args$args, and in other tools look for a keep or pass query string option.
Will my Google Ads conversions still count if the gclid is lost?
Some may be modelled or matched in other ways, but you lose the direct link between click and sale. Keeping the gclid through the handoff gives Google Ads the best data for reporting and bidding.
How can I monitor this automatically?
FunnelGuard runs a robot visitor through your journey on a schedule and checks whether campaign parameters survive the handoff to another domain. It alerts you once a failure is confirmed from a second region.
Related issues
- CNV-362Cross-domain linker (_gl) missingFix 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-365Third-party domain SSL invalidFix guide
- CNV-367Mixed brand domain confuses users (phishing look)Fix guide