Skip to main content

Tracking

What is a click ID?

Quick Definition

A click ID is a unique identifier that ad platforms append to destination URLs when a user clicks an ad. gclid (Google), fbclid (Meta), msclkid (Microsoft), ttclid (TikTok). Click IDs let ad platforms attribute conversions back to specific ad clicks even after browser cookies have been blocked or expired. Preserving the click ID through redirects and into server-side conversion APIs is critical for modern ad tracking.

The major click IDs in 2026

  • gclid — Google Ads. Appended automatically when "auto-tagging" is enabled in Google Ads (the default). Looks like ?gclid=Cj0KCQjw...
  • gbraid and wbraid — Google's iOS-specific click IDs that respect App Tracking Transparency rules. Used when the user hasn't opted in to cross-app tracking.
  • fbclid — Meta (Facebook + Instagram). Appended automatically to Facebook/Instagram ad destination URLs.
  • msclkid — Microsoft Advertising (Bing + Yahoo). Auto-tagged by Microsoft Ads.
  • ttclid — TikTok Ads. Auto-tagged in TikTok ad destination URLs.
  • li_fat_id — LinkedIn Ads.
  • twclid — X/Twitter Ads (formerly ad_id).
  • epik — Pinterest Ads.
  • sccid — Snapchat Ads.

A typical URL with click ID:

https://affbuddy.com/playbook-tracking-setup?fbclid=IwAR3xK8...&utm_source=facebook

Why click IDs became critical

Pre-2021, ad-platform tracking relied primarily on third-party cookies. Meta would set a cookie when the user clicked a Facebook ad, then read that cookie when the user converted on the advertiser's site. Cookie set + cookie read = matched conversion.

That model has been systematically broken:

  • Safari and Firefox block third-party cookies entirely
  • iOS 14+ App Tracking Transparency blocks the IDFA
  • Chrome is in the middle of deprecating third-party cookies
  • Ad blockers strip the pixel scripts that set first-party cookies
  • Privacy tools (DuckDuckGo, Brave, Private Relay) strip cookies aggressively

Click IDs survive most of this. The click ID is a query-string parameter in the URL — visible to the destination server, visible to any code that runs on the destination page, persistent through HTML transitions. When server-side conversion tracking sends the click ID back to the ad platform, the platform can match the conversion back to the click via that ID rather than relying on a cookie.

The shorthand: click IDs are what enable server-side conversion APIs (Meta CAPI, Google Enhanced Conversions, TikTok Events API) to maintain decent match rates in a world where cookies have largely stopped working.

Preserving click IDs through your tracking stack

The click ID arrives on your landing page in the URL. If you don't actively preserve it, it disappears the moment the user navigates anywhere else. Three preservation points:

  1. On landing. Capture the click ID from the URL query string and store it in a first-party cookie or localStorage. Many tag managers (Google Tag Manager, server-side GTM, Stape) have built-in macros to do this for the major platforms.
  2. Through user flow. When the user submits a form, signs up, or clicks an outbound affiliate link, append the click ID to the destination URL or include it in form data. For affiliate marketers running paid traffic to bridge pages, this means the click ID needs to be in the URL when the user clicks the outbound affiliate link — so it can be matched later if the conversion happens server-side.
  3. At conversion. When the conversion fires (signup, purchase, lead form), include the click ID in the conversion payload sent to the ad platform's conversion API. Meta CAPI takes fbc (a constructed Facebook click cookie including the fbclid). Google Enhanced Conversions takes gclid. TikTok takes ttclid. Without the click ID, the platform falls back to other matching signals (hashed email, hashed phone, IP) which match at substantially lower rates.

Click ID lifecycle and storage

  • Storage: first-party cookie or localStorage on your domain. Don't try to store cross-domain — that's exactly what the cookie deprecation is designed to prevent.
  • Lifetime: match the platform's attribution window. Meta is 7 days (default) or up to 90 days for some campaigns. Google is up to 90 days. TikTok is up to 28 days. Store the click ID with a TTL matching your platform's max window.
  • Renewal: if the same user lands again with a new click ID, overwrite the old one (last-click attribution applies to the ad-platform side too).

Common click-ID failure modes

  • Click ID stripped by a redirect. Some affiliate-network redirects don't preserve unknown query parameters. The user clicks your bridge page's affiliate link, the network's redirect strips fbclid, and now the merchant's site never sees it. Fix: capture the click ID on the bridge page, store server-side, and pass it back when the conversion fires.
  • Click ID lost across HTTP/HTTPS. Some legacy referrers strip query parameters on protocol transitions. Force HTTPS everywhere; never let traffic land on HTTP.
  • Click ID stored as third-party cookie. If you store the click ID in a third-party cookie (cookie set by a different domain), it gets blocked by Safari/Firefox/Brave the same way other third-party cookies do. Always store as first-party.
  • Click ID truncated. Some social platforms truncate URL parameters when previewing or sharing links. Test the full URL with click ID through your tracking flow end-to-end at least once per quarter.

For the broader context — how click IDs fit into the four-layer tracking stack — see the tracking-setup playbook.

Frequently asked questions

What is a click ID?

A click ID is a unique identifier that ad platforms append to destination URLs when a user clicks an ad. Google Ads uses gclid (and gbraid/wbraid for iOS), Meta uses fbclid, Microsoft Ads uses msclkid, TikTok Ads uses ttclid, LinkedIn uses li_fat_id. The click ID lets the ad platform identify and attribute conversions back to the specific ad click — even in scenarios where browser cookies have been blocked, expired, or stripped by privacy tools.

Why are click IDs important for affiliate marketing?

Click IDs are what enable server-side conversion APIs to work. When you fire Meta CAPI or Google Enhanced Conversions, the click ID is the key identifier the platform uses to match your reported conversion back to the original ad click. Without the click ID, server-side conversions match at maybe 20-40%. With a preserved click ID, match rates climb to 70-90%+. For paid affiliate traffic running through a bridge page, preserving the click ID through every hop is non-negotiable in 2026.

How do I preserve a click ID through redirects?

Three places to handle click IDs. (1) On your landing page or bridge page, capture the click ID from the URL query string and store it (cookie, localStorage, or session). (2) When the user submits a form, signs up, or clicks an affiliate link, pass the click ID forward in the URL or in form data. (3) When the conversion happens server-side, include the click ID in the payload to the ad platform's conversion API. Affiliate trackers (Voluum, RedTrack, BeMob) automate most of this; custom setups need to handle it explicitly.

What's the difference between gclid, fbclid, msclkid, and ttclid?

They serve the same function but belong to different platforms. gclid is Google Ads' identifier (with gbraid and wbraid being iOS-specific variants that respect App Tracking Transparency). fbclid is Meta's. msclkid is Microsoft's. ttclid is TikTok's. li_fat_id is LinkedIn's. Each platform's conversion API expects its own click ID format. If you advertise on multiple platforms, you need to capture and forward each platform's click ID separately — they don't interchange.

Related terms

Put it to work

Wire click IDs through the full tracking stack

Preserving click IDs is one piece of a working tracking setup. The playbook covers the complete UTM → pixel → postback → server-side flow.