← All resources Guide

Recovering click IDs: Google, Microsoft, Meta, TikTok, Pinterest, ChatGPT & LinkedIn Ads

Every click from a paid ad carries a click ID in the landing URL — gclid for Google Ads, msclkid for Microsoft Ads, fbclid for Meta, ttclid for TikTok, epik for Pinterest, oppref for ChatGPT Ads, li_fat_id for LinkedIn Ads. Your tags read that ID to credit a conversion back to the right ad, keyword and campaign. Safari and Brave, in their stricter privacy modes, strip most of them before your page — or your tagging server — ever sees them.

Why click IDs get stripped

Safari's Intelligent Tracking Prevention and Brave's Shields treat click IDs as tracking parameters and remove them from the landing URL in Private Browsing and strict modes — the same category of protection covered in our guide on cookie lifetime on Safari. By the time the request reaches your server container, the click ID is simply gone.

Google & Microsoft: the backup-parameter mechanism

Click ID Restorer, found on each domain's Power-ups page, works around the stripping instead of fighting it — for gclid and msclkid. In Google Ads or Microsoft Ads, you set a Final URL suffix that appends the click ID under a name of your own choosing instead of the standard one — e.g. backup_gclid={gclid}. Browsers only recognize and strip the standard parameter names, so a custom one passes through untouched.

On every request, Measurebase checks for a missing gclid or msclkid whose backup twin is present, and restores it — both in the request's own query string and inside the dl parameter GA4 embeds the full landing URL into, since that's what the GA4 tag actually reads the click ID from. Your GTM tags see the click ID exactly as if Safari had never touched it.

Setting up Google & Microsoft

  1. Open Click ID Restorer on your domain's Power-ups page and turn it on.
  2. Choose a backup parameter name for each platform you use — or keep the suggested backup_gclid / backup_msclkid.
  3. In your Google Ads or Microsoft Ads campaign settings, add a Final URL suffix using that same name, e.g. backup_gclid={gclid}.
  4. Save. New clicks carrying the backup parameter get their real gclid/msclkid restored automatically — no changes needed on the tag side.

Naming the backup parameter

The name is yours to pick, but a few rules keep it working — and one or two keep it working reliably:

Meta, TikTok, Pinterest, ChatGPT & LinkedIn Ads: a different mechanism

Neither Meta, TikTok, Pinterest, ChatGPT Ads nor LinkedIn offer a Final URL suffix you can customize the way Google and Microsoft do — there's no ad-platform setting that gives fbclid, ttclid, epik, oppref or li_fat_id a backup twin to swap in. So Click ID Restorer recovers these five a different way: turning one on installs a small extra script alongside your loader, which captures the click ID into a first-party _mb_fbclid/_mb_ttclid/_mb_epik/_mb_oppref/_mb_li_fat_id cookie the moment it lands on your page. If a later request is missing the parameter, Measurebase restores it from that cookie instead of from a URL backup — same result, different mechanism.

This matters most for Meta: Meta's own documentation ties a missing fbc value directly to lower Event Match Quality scores in Conversions API, even when hashed email/phone fallbacks are present. Recovering fbclid isn't optional plumbing — it measurably affects match quality.

Setting up Meta, TikTok, Pinterest, ChatGPT & LinkedIn Ads

  1. Open Click ID Restorer on your domain's Power-ups page.
  2. In the Meta / TikTok / Pinterest / ChatGPT / LinkedIn Ads section, turn on whichever platforms you actually run ads on.
  3. Save. No ad-platform-side setup needed — just the toggle.

What it doesn't cover

Click ID Restorer gets the click ID back into the request; Cookie Keeper then keeps the cookies built from it, such as _gcl_aw and _gcl_dc, alive for their full lifetime instead of expiring after days. On Safari that needs Same-Origin Tracking too. See the full list of cookies Cookie Keeper extends for the complete picture.

Continue reading

Ready to improve your tracking setup?

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

Start free