← All resources Guide

The Conversion Linker and click IDs: gclid, gbraid, wbraid

A Google Ads conversion is only credited to an ad when the click and the conversion can be connected. That connection is a click ID: a parameter Google adds to your landing page URL, which a tag on your site stores and sends back with the conversion. At the end of this article you know what gclid, gbraid and wbraid are, which setting makes Google send them, what the Conversion Linker tag does with them, and how to keep them across two domains.

Part of the Google Ads measurement series. It follows Google Ads conversion tracking with Tag Manager, step by step, which builds the conversion tag itself. This article explains the part underneath it.

The three click IDs

Google Ads uses three identifiers, and one click carries the one that fits its situation.

The practical difference: a gclid is one click, while gbraid and wbraid are shared by many clicks. Conversions measured through them are reported in aggregate, and you cannot look up a single sale by its ID. All three are case sensitive: a system that turns a URL into lower case breaks them.

You will also see gad_source and gad_campaignid on your landing pages. Those are not click IDs but aggregate campaign data, and they need to survive on the URL just like the click IDs do.

Auto-tagging: the switch that adds them

Click IDs are only added when auto-tagging is on. In Google Ads, open Admin › Account settings › Auto-tagging and tick Tag the URL that people click through from my ad. Google turns it on by default in new accounts.

One case to check by hand: when conversions are tracked from a manager account (cross-account conversion tracking), Google says auto-tagging has to be switched on in every child account. The article on several sites and several accounts covers that setup.

Auto-tagging puts the parameter at the end of the final URL, before any # fragment. Google's own warning on the page is about redirects: if your site redirects the visitor, the click ID has to be passed on to the page they end up on, or the conversion is not tracked.

What the Conversion Linker does

A click ID in the URL is only there on the first page. The conversion usually happens several pages or several days later. The Conversion Linker closes that gap. In Google's words it detects ad click information in the landing page URL and stores it in first-party cookies and in the browser's local storage, on your own domain. When a Google Ads conversion tag fires later, it reads that stored value and sends it with the conversion.

To add it in Tag Manager: Tags › New › Tag Configuration › Conversion Linker, with the All Pages trigger. Google's advice is to have it on every page a visitor can land on after an ad click, which in practice means every page.

Google states that a container with a Google tag on every page does not need a separate Conversion Linker tag: the Google tag does the same job. Having both does no harm, and an explicit tag is the only place to set the options described below. On the conversion tag itself, leave Enable Conversion Linking on, as it is by default.

The cookies it writes

The cookies start with _gcl_. Google's cookie list names _gcl_aw, _gcl_gb, _gcl_gs and _gcl_ag for Google Ads, and _gcl_au for Google Ads and its other advertising products, each with a lifespan of 90 days. The local storage copy uses the key _gcl_ls. By default the cookies are set on the highest domain level possible (acme.nl, not shop.acme.nl) with the root path, so every subdomain reads the same values.

Google's list does not describe what each cookie holds. In practice you will find the gclid of the last ad click in _gcl_aw, and a gbraid in _gcl_gb. To look: open the browser's developer tools on your site, go to Application › Cookies, and filter on _gcl.

The Conversion Linker tag has an Override cookie settings (advanced) box with three fields: Name (the prefix, _gcl_ by default), Domain and Path. Use them only for a reason, such as two setups whose cookies must not mix. If you change the prefix, every Google Ads tag needs the same value under Cookie Prefix. The lifetime cannot be changed in this tag.

Ninety days is what the tag asks for. What the browser grants can be shorter: Safari limits many cookies to seven days. That is a separate subject, covered in cookie lifetime on Safari.

With Consent Mode in place, the Conversion Linker follows ad_storage. While it is denied, Google's reference says no new advertising cookies are written and existing first-party advertising cookies cannot be read. The click ID is then only known on the landing page. Once the visitor moves to the next page it is gone, unless one of two things happens: they accept the banner while the click ID is still in the URL, or URL passthrough is on.

URL passthrough (url_passthrough) carries the ad click information from page to page in the links of your own site instead of in a cookie. Google lists gclid, dclid, gclsrc, _gl and wbraid as the parameters it may append. It only works on links within the same domain, and your own redirects have to keep those parameters.

What the three consent signals do to your Google Ads numbers is its own article: what Consent Mode does to your Google Ads numbers. The setup is in Consent Mode v2 in Tag Manager.

Linking two domains

A first-party cookie belongs to one domain. When the ad lands on acme.nl and the order is placed on checkout.acme-pay.com, the second domain cannot read the cookie the first one wrote. Subdomains of one domain already share the cookie.

The fix is in the same tag. Under Linker Options, tick Enable linking across domains and list the other domain under Auto Link Domains. From then on, a link that points to a listed domain gets a _gl parameter with the cookie values at the moment of the click. The tag on the other side reads it and writes its own cookie.

To test it, click from the first domain to the second and look for _gl= in the address bar, then check that the _gcl_ cookies exist on the second domain. The general version of this subject, including GA4, is in cross-domain tracking.

Check that it works

Google's own test needs no ad click. Take a landing page URL, add ?gclid=TeSter-123 (or &gclid=TeSter-123 when the URL already has a question mark), and load it.

  1. The parameter is still in the address bar after the page has finished loading, in the same upper and lower case.
  2. Open Application › Cookies. The _gcl_aw cookie now contains the test value. If you run a consent banner, accept it first.
  3. In Tag Manager's Preview, the Conversion Linker shows under the tags that fired on the first event of the page.

If step 1 fails, the site is dropping the parameter before any tag can see it. That, and every other way a click ID goes missing, is the subject of lost click IDs.

When you run this through a server container

The click IDs, auto-tagging and the cross-domain settings stay exactly as described: they live in Google Ads and in the browser. What is added is a second Conversion Linker. Google's server-side setup starts with a Conversion Linker tag in the server container, on all pages, next to the server-side Google Ads Conversion Tracking tag. Google's cookie list has separate names for the server-side cookies, FPGCLAW and FPGCLGB, also with 90 days.

Keep the Conversion Linker in the web container too. It is still the tag that reads the landing page URL and decorates cross-domain links. The consent rules do not change either.

With Measurebase the server container runs on your own domain, and the container import described in Google Ads conversion tracking through your server container adds both Conversion Linker tags for you, the web one with URL passthrough on.

Frequently asked questions

What is the difference between gclid, gbraid and wbraid?

A gclid identifies one ad click. gbraid and wbraid are used on iOS 14 and later where Google does not send a gclid: wbraid for ads in an app that lead to a website, gbraid for ads that lead into an app. Both are shared by many clicks, so conversions measured with them are reported in aggregate.

Do I still need a Conversion Linker tag if I have a Google tag?

According to Google, a container with a Google tag on every page does not need a separate Conversion Linker tag. Keeping one does no harm, and you need it as soon as you want to link domains or change the cookie prefix, domain or path.

How long does the _gcl_aw cookie last?

Google lists the _gcl_ cookies with a lifespan of 90 days, and the Conversion Linker tag has no setting to change that. A browser can shorten it: Safari limits many cookies to seven days.

Where do I turn on auto-tagging in Google Ads?

Under Admin, Account settings, Auto-tagging, with the box "Tag the URL that people click through from my ad". It is on by default in new accounts. With cross-account conversion tracking it has to be on in every child account.

Does the Conversion Linker work without consent?

With Consent Mode it follows ad_storage. While that is denied, no advertising cookies are written or read, so the click ID is not stored. URL passthrough can carry it between pages of the same domain in the meantime.

Continue reading

Ready to improve your tracking setup?

Start free, no credit card required. Live in about 15 minutes.

Start free