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.

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_passthrough value 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

Share this article

Timo Leser

Sales specialist

Sales specialist at Consent Studio, helping businesses and agencies get consent management right.

Back to the blog

Consent breaks in three places

You don't know every tracker running on your site, your visitors are never asked about some of them, and tags fire before anyone has said yes. In other words: you cannot fix what you do not know.

  • Unconsented tracking
  • Unwanted overseas transfers
  • Consent records you cannot produce
  • Scripts you never approved

The Full Consent Stack.

Web CMP asks for consent and stores every answer in the consent log for 12 months. Launcher only fires a tag once the visitor has consented to it. Monitoring scans your site weekly and reports where your banner or integrations do not work as configured.

Get Started with the Full Consent Stack

Everything you need in one bundle. Consent Studio processes and stores consent data from EU visitors on infrastructure of European companies inside the EU (Scaleway, France; Bunny, Slovenia). Which tags send data afterwards, and where to, is up to you in Launcher.

Read the documentation

Our help center walks through every integration, plugin and template step by step, with screenshots. It is written and kept current by the people who build Consent Studio.