- Home
- Blog
- Marketing & Measurement
- Who adds ?_gl= to your URLs? Google's tags
Who adds ?_gl= to your URLs? Google's tags
Seeing ?_gl= or gclid in your URLs before visitors answer the banner? That is Google's URL passthrough. What it does, and where you switch it.
By Timo Leser3 min read
Someone on your team opens your website, clicks through to a product page and sees a long code in the address bar: ?_gl=1*abc... or gclid=.... The visitor has not answered the cookie banner yet. Is the banner broken, or is something tracking people before they choose?
Neither. In most cases you are looking at URL passthrough, a Google Consent Mode feature that is doing exactly what it was built for.
Why do ?_gl= and gclid codes appear in your URLs?
As long as a visitor has not given consent for storage, Google tags cannot use cookies to remember where the visit came from, such as the ad click that brought them in. With URL passthrough switched on, the tags carry that information in the links on your page instead, as URL parameters like ?_gl=, gclid or dclid. So the codes show up precisely in the moment before someone makes a choice in the banner.
Should you keep URL passthrough on or off?
It is a trade-off, and both answers are reasonable.
- On helps Google keep measuring and attributing ad clicks without cookies. If you run Google Ads and rely on that attribution, this is the reason to keep it.
- Off keeps your URLs clean. That matters if the codes bother your team, or end up in links people copy and share.
Make the choice together with whoever owns your ad reporting, so nobody is surprised when the numbers or the URLs change.
Why does one website show the codes and another does not?
Because the default depends on how Consent Studio is installed. The Installation Code from the setup wizard ships with URL passthrough off. The Consent Studio tag template for Google Tag Manager has it on by default, on purpose, because it gives Google a small data advantage in attributing clicks.
That explains a common surprise: a site moves from the Installation Code to the Google Tag Manager template, and the codes suddenly appear. Nothing broke. The installation method changed, and with it the default.
How do you change URL passthrough in Consent Studio?
There is one setting per installation method, so you decide once and it applies everywhere that installation runs:
- With the Installation Code, it is the
url_passthroughvalue in the configuration at the top of the code. The installation questionnaire in the dashboard can help you adjust your snippet. - With the Google Tag Manager template, it is the Enable URL Passthrough option in the Consent Studio tag. After changing it, publish your container.
The step by step instructions, kept up to date as the product changes, are in the help center: URL passthrough. If you are also weighing how much data Google receives when visitors reject, read Consent Mode v2: Advanced vs Basic.
Also available in German, Dutch
Back to the blog
