Skip to Content
Platform.Ontology

Ad click IDs (gclid, fbclid, msclkid and more)

Unique IDs ad platforms add to links so a later purchase can be matched to the exact ad click.

Used to track youTracking across apps and sitesBefore the visitWeb browsersBefore you visitWhen the page loadsAfter you leave the site

In one line

Can tag your ad click so a later purchase links back to that exact ad

Unique IDs ad platforms add to links so a later purchase can be matched to the exact ad click.

A click ID ties one person's click on an ad to later conversions, even across sessions, and is stored in a first-party cookie (for example Google _gcl_aw about 90 days, Meta _fbc about 90 days). iOS ATT era gbraid/wbraid are aggregated.

What it can and can't do

What the user does: You click an ad link that carries a code such as gclid, fbclid or msclkid

It can

  • Add a unique code to the web address of the page you land on
  • Let the site or its ad tools save that code
  • Match a later purchase or sign up to your ad click
  • Pass the code to the ad company on the server side

It cannot

  • Exist unless you arrived through an ad link with the code
  • Follow you to other sites on its own
  • Work if your browser strips known codes from links, in some modes
  • Name you; it is a code, not a name, until matched to an account

How it differs between platforms: Safari, Firefox and Brave remove some of these codes from links in certain modes. Chrome keeps them.

Browser support

BrowserStatusFirst versionReleasedNote
ChromeSupported12008-12-11URL parameters travel in any browser unless stripped
EdgeSupported1Not listedURL parameters travel in any browser unless stripped
FirefoxSupported12004-11-09URL parameters travel in any browser unless stripped
SafariSupported12003-06-23URL parameters travel in any browser unless stripped
Safari on iPhoneSupported12007-06-29URL parameters travel in any browser unless stripped
Chrome on AndroidSupported1Not listedURL parameters travel in any browser unless stripped
Samsung InternetSupported12013-04-27URL parameters travel in any browser unless stripped

How a site asks for it

APIURL query: gclid, gbraid, wbraid (Google), fbclid (Meta), msclkid (Microsoft), ttclid (TikTok), li_fat_id (LinkedIn), twclid (X), epik (Pinterest), igshid (Instagram)
How access is grantednone
What the user seesNone
Needs a secure context (HTTPS)No
Needs a user gestureNo
How long it lastsFirst-party cookie copies, typically 30 to 90 days, then sent to ad platforms via pixel or server API
How to take it backClear site data, browser privacy settings
Inside an iframeNot listed

Data you get

What comes back: Opaque per click token
Shape: string
How often: per ad click

FieldTypeUnitRangePrecision
gclidstringtokenup to about 100 charsunique per click
fbclidstringtokenabout 60 to 100 charsunique per click

Technical limits

  • Stripped in Safari Private Browsing, Mail and Messages (Link Tracking Protection) and Firefox ETP Strict
  • Chrome leaves them intact
  • Platforms may refuse conversions older than their attribution window (often 7 to 90 days)
  • Only identifies a click, not a person's identity by itself

The story

What it is

A unique code added to an ad link so a later purchase can be matched to that exact click.

For you

You click an ad and the web address ends in a long string of letters and numbers. You may not notice it. The site saves that code, so a sale next week can be tied to your click.

For makers

Advertisers want to know which ad paid off, down to one click. A click code stored in the advertiser's own cookie survives most privacy rules for about three months. It is the base of nearly all ad accounting, and the reason for the arms race with browser protections.

Where you see it

TypeExampleApps
adsYou click a Google ad for running shoes. A gclid is added, the shop stores it, and the sale is credited to that click.Google Ads, Nike
socialYou tap an Instagram ad, an fbclid joins the link, and Meta can link your purchase to that ad.Meta Ads
gamesA mobile game web store tracks which ad brought a player who later buys gems, to pay the ad network.Roblox web, Steam
analyticsA marketer sees which of 40 ads made money, instead of only which got clicks.Google Analytics, Triple Whale
shoppingA retailer in a Black Friday ad run sees which keyword made the sale and moves budget in real time.Amazon Ads, Shopify
securityFraud teams look for the same click code used by many sales, which is a sign of fake traffic.None named
mediaA newsletter site sees which ad created each paying subscriber, and which only brought free readers.Substack, The New York Times

Risks

  • Ties a click to a person
  • Codes can leak in shared links

What the platform says

Good uses and abuse

Legitimate uses

  • Offline conversion upload
  • Ad ROI measurement
  • Fraud filtering

Known abuse

  • Cross-session identity stitching
  • Sharing click ID with unrelated vendors

Scores

ScoreValueMeaning
Sensitivity4 of 5How revealing the data is
Utility5 of 5How useful it is to honest apps
Friction0 of 5How much the user has to do
Fingerprint bits0Rough identifying entropy, when known

History

  • 2021-04, Safari 14.5: iOS ATT; Google introduced gbraid and wbraid for aggregated iOS app to web measurement
  • 2022-06, Firefox 102: Query Parameter Stripping removes known trackers in ETP Strict and Private windows
  • 2023-09, Safari 17: Link Tracking Protection strips known click IDs in Private Browsing, Mail and Messages

Sources

How well checked: Based on official documentation.

On this page