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.
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
| Browser | Status | First version | Released | Note |
|---|---|---|---|---|
| Chrome | Supported | 1 | 2008-12-11 | URL parameters travel in any browser unless stripped |
| Edge | Supported | 1 | Not listed | URL parameters travel in any browser unless stripped |
| Firefox | Supported | 1 | 2004-11-09 | URL parameters travel in any browser unless stripped |
| Safari | Supported | 1 | 2003-06-23 | URL parameters travel in any browser unless stripped |
| Safari on iPhone | Supported | 1 | 2007-06-29 | URL parameters travel in any browser unless stripped |
| Chrome on Android | Supported | 1 | Not listed | URL parameters travel in any browser unless stripped |
| Samsung Internet | Supported | 1 | 2013-04-27 | URL parameters travel in any browser unless stripped |
How a site asks for it
| API | URL query: gclid, gbraid, wbraid (Google), fbclid (Meta), msclkid (Microsoft), ttclid (TikTok), li_fat_id (LinkedIn), twclid (X), epik (Pinterest), igshid (Instagram) |
| How access is granted | none |
| What the user sees | None |
| Needs a secure context (HTTPS) | No |
| Needs a user gesture | No |
| How long it lasts | First-party cookie copies, typically 30 to 90 days, then sent to ad platforms via pixel or server API |
| How to take it back | Clear site data, browser privacy settings |
| Inside an iframe | Not listed |
Data you get
What comes back: Opaque per click token
Shape: string
How often: per ad click
| Field | Type | Unit | Range | Precision |
|---|---|---|---|---|
gclid | string | token | up to about 100 chars | unique per click |
fbclid | string | token | about 60 to 100 chars | unique 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
| Type | Example | Apps |
|---|---|---|
| ads | You 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 |
| social | You tap an Instagram ad, an fbclid joins the link, and Meta can link your purchase to that ad. | Meta Ads |
| games | A mobile game web store tracks which ad brought a player who later buys gems, to pay the ad network. | Roblox web, Steam |
| analytics | A marketer sees which of 40 ads made money, instead of only which got clicks. | Google Analytics, Triple Whale |
| shopping | A retailer in a Black Friday ad run sees which keyword made the sale and moves budget in real time. | Amazon Ads, Shopify |
| security | Fraud teams look for the same click code used by many sales, which is a sign of fake traffic. | None named |
| media | A 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
- Apple: Link Tracking Protection. Apple says Safari 17 removes tracking codes from links in Private Browsing, Mail and Messages to protect privacy.
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
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 4 of 5 | How revealing the data is |
| Utility | 5 of 5 | How useful it is to honest apps |
| Friction | 0 of 5 | How much the user has to do |
| Fingerprint bits | 0 | Rough 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
Related capabilities
Related
- Click ID and query parameter stripping. Can remove known tracking codes from links before the site sees them, in some modes
- UTM campaign parameters. Can see which ad, email, or post sent you, from tags in the link
- Conversions APIs (server to server). Can send your purchases and sign ups to ad platforms from the advertiser's server
Sources
- WebKit: Link Tracking Protection (Safari 17)
- Google Ads auto-tagging and gclid
- Firefox Query Parameter Stripping
How well checked: Based on official documentation.