On this page
What this issue is
When someone clicks a Google ad with auto-tagging on, Google adds ?gclid=... to your landing page URL. Your Google tag reads that value and saves it in a first-party cookie (_gcl_aw) so a later conversion can be credited to the click.
Two common redirects break this. The first sends /pricing to /pricing/ (or the reverse). The second sends visitors from /pricing/ to /en/pricing/ or /de/pricing/ based on browser language or location. If the rule is written badly, the new URL has no query string. The gclid is gone before the page loads.
- Ad click/pricing?gclid=abc123
- Redirect301 to /en/pricing/ with no query string
- Landing pageGoogle tag finds no gclid
- ConversionNot matched to the click
The redirect fires before any tag can read the URL.
Why it costs you leads or sales
The leads still arrive, but Google Ads does not see them as coming from your ads. Reported conversions fall, cost per conversion looks worse, and Smart Bidding learns from less data. It may then lower bids on the very campaigns that work. UTM parameters are often lost in the same redirect, so your analytics shows the traffic as direct.
The problem is easy to miss. Pages load, forms submit and the thank-you page appears. Only the attribution breaks.
Example: the same 50 real leads, before and after a redirect starts stripping the gclid.
The visitor lands on the final URL without the gclid.
How to check if your site has it
Build a test URL
Take a real landing page and add
?gclid=test123&utm_source=test. Try it with and without the trailing slash, for example/pricing?gclid=test123and/pricing/?gclid=test123.Load it in a private window
Open the URL and look at the address bar once the page has loaded. If
gclid=test123is missing, a redirect removed it.Test the language paths
Repeat for the root URL and for each language version. Change the browser language if your site redirects by language.
Trace the hops
Run the command below. Check that every
location:header still contains the query string.
curl -sIL "https://example.com/pricing?gclid=test123" | grep -iE "^(HTTP|location)"How to fix it
The goal is one redirect, to the final URL, that keeps the query string. Fix the rule where it lives. It may be in your server config, a CMS plugin, a CDN, a language plugin or a hosting panel. Also remove chains such as http to https to www to trailing slash to language, since each hop is another chance to lose parameters.
Find the redirect source
Check redirect plugins (Redirection, Rank Math, Yoast Premium), your language plugin (WPML, Polylang, TranslatePress) and any caching or security plugin with redirect options.
Turn on query-string passing
In Redirection, edit the rule and set Query Parameters to 'Pass-through'. In language plugins, check the browser-language redirect settings and update the plugin if parameters are dropped.
Fix the permalink slash
Under Settings, Permalinks, keep the structure consistent. WordPress normally keeps the query string when it adds a trailing slash, so a custom rule is likely the culprit.
Review URL redirects
Go to Content, Menus, View URL Redirects. Redirects here do not need the query string in the target. Shopify normally keeps it, so check for a theme script or app doing a language redirect.
Check Markets and language apps
If you use a geolocation or language redirect app, test it with a gclid URL and ask the vendor how it handles parameters. Switch to Shopify's own Markets domains or subfolders where possible.
Confirm GTM is not the cause
GTM cannot stop a server redirect. If you redirect with a Custom HTML tag using window.location, append
window.location.searchto the new URL.Capture on first load
Make sure the Conversion Linker tag fires on All Pages, including the page that redirects, so it can save the gclid before the script moves the visitor.
Check 301 redirects
Open Site settings, Publishing, 301 redirects. Webflow keeps query parameters on these redirects in most cases. Test your own paths with the curl command to be sure.
Check localization settings
If you use Webflow Localization, test a gclid URL on the root domain and each locale. Look for custom code or a third-party script doing the locale redirect.
Review funnel and website paths
In Sites, check the domain and path settings and any URL redirects you added. Test each with a gclid URL.
Avoid redirect pages
Link ads straight to the final funnel step URL instead of a redirect page.
Check URL redirect manager
Go to Marketing & SEO, then URL Redirect Manager. Review any rules for your landing pages and test them with a gclid URL.
Check Wix Multilingual
If auto-redirect by browser language is on, test it with a gclid URL. Turn it off, or point ads at the final language URL.
Review URL mappings
Go to Settings, Developer Tools, URL Mappings. Squarespace keeps query strings on most redirects, but test each of your rules with a gclid URL.
Use final URLs in ads
Set your ad final URLs to the exact page URL, including the trailing slash and language folder, so no redirect is needed.
Fix Apache rules
Add the QSA flag to rewrite rules so the original query string is appended. See the .htaccess snippet below.
Fix nginx rules
Use
$is_args$argsin the redirect target. See the nginx snippet below.Fix app-level redirects
In your framework or language middleware, copy the full query string to the new URL.
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !/$
RewriteRule ^(.*)$ /$1/ [R=301,L,QSA]location = /pricing/ {
return 301 /en/pricing/$is_args$args;
}Before
- /pricing?gclid=abc redirects to /en/pricing/
- Query string dropped
- No _gcl_aw cookie
- Conversion not matched to the ad
After
- /pricing?gclid=abc redirects to /en/pricing/?gclid=abc
- Query string kept
- _gcl_aw cookie saved
- Conversion matched to the ad click
Ad click → yoursite.com/offer?gclid=Cj0KCQ…&utm_source=google&utm_campaign=spring
301 redirect
Lands on → yoursite.com/offer/
- gclid
- utm_source
- utm_campaign
The landing page loads without the gclid, so no _gcl_aw cookie is saved and the conversion cannot be tied to the ad click.
Toggle to see how one redirect rule changes attribution.
How to confirm it's fixed
- Test URLs with
?gclid=test123load with the gclid still in the address bar, with and without the trailing slash - Each language version keeps the parameter
- The curl output shows a single hop, with the query string in every Location header
- A
_gcl_awcookie appears after landing - In GTM Preview or the Tag Assistant, the Google tag and Conversion Linker fire on the landing page with the gclid present
- A real test conversion later shows in Google Ads, which can take some hours
How to prevent it happening again
- Test a gclid URL after every change to redirects, language plugins, CDN rules, domains or permalinks
- Use the final canonical URL in every ad
- Keep redirects to one hop
- Ask agencies and plugin vendors whether redirects pass the query string
- Re-test after site migrations and relaunches
Day 1
A language plugin or new redirect rule is added.
Day 1
Pages load fine, so nobody notices anything wrong.
Week 1
Google Ads conversions drop and cost per lead rises.
Week 2
The redirect is found and fixed to keep the query string.
How FunnelGuard handles this
FunnelGuard detects this issue today. Its robot visitor loads your landing pages on a schedule, with a click ID and UTM parameters on the URL, and checks whether they survive any redirect to the final page. It also checks the tracking hits sent to Google Ads and other platforms. If a failure shows up, it is re-checked from a second region before one alert goes out, with a screenshot and a likely cause.
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 and no card. Paid plans have a 3-day free trial.
Questions people ask
Why is my gclid missing after the page loads?
Most often a redirect dropped the query string. Trailing-slash, www, https and language redirects can all do this. Test your landing page with ?gclid=test123 added and see if it is still in the address bar.
Does a trailing-slash redirect remove the gclid?
It can if the rule is written without passing the query string. Apache needs the QSA flag, and nginx needs $is_args$args in the target. Many CMS platforms keep the query string by default, but custom rules often do not.
How do I stop a language redirect from removing UTM parameters and gclid?
Change the redirect so it copies the full query string to the new URL. In a plugin, look for a query-parameter pass-through option or update the plugin. Better still, send ads straight to the final language URL so no redirect happens.
How can I test whether my redirect keeps the gclid?
Open your page with ?gclid=test123 added in a private window and check the address bar after loading. You can also run curl -sIL on the URL and check that every Location header keeps the query string.
What happens to Google Ads conversions if the gclid is lost?
Leads still come in, but Google Ads cannot connect them to the ad click. Reported conversions drop and Smart Bidding gets weaker data. Your analytics may also show the traffic as direct.
Can Google Tag Manager fix a gclid lost in a server redirect?
No. A server-side redirect happens before the page and GTM load, so the tag never sees the gclid. You have to fix the redirect rule, or link ads to the final URL.
Does FunnelGuard detect a stripped gclid?
Yes. It loads your landing pages with test parameters on a schedule and checks whether they survive redirects. It re-checks failures from a second region before alerting you.
Related issues
- TRK-144gclid stripped by redirect to www / httpsFix guide
- TRK-146gclid stripped by cookie banner reloadFix guide
- TRK-143_gcl_aw cookie not set after gclid landingFix guide
- TRK-142Conversion Linker tag missingFix guide
- TRK-147gbraid / wbraid not preserved (iOS traffic)Fix guide
- TRK-148gclid not stored in hidden form field / CRMFix guide