gclid vs UTM tags: gclid, fbclid and msclkid explained
By Devendra Variya, co-founder of Virling. Published 2026-11-24.
gclid vs UTM: a gclid is a code Google Ads adds to your link so that Google can recognise the click. UTM tags are words you write, such as utm_campaign=brand-search, that any analytics tool can read. fbclid does the same job for Meta and msclkid for Microsoft Advertising. A click ID names no campaign to anyone but the ad platform that made it, so keep click IDs on for the platform’s own reports and add UTM tags for everything else. They work together on one link.
The common click IDs
| Click ID | Who adds it | What it is for | Who can read it |
|---|---|---|---|
gclid | Google Ads, when auto-tagging is on | Website conversion tracking and linking Google Ads with Google Analytics | Google, and you through your Google Ads account |
fbclid | Meta, on a click on a Facebook or Instagram ad | Matching the events your site sends to Meta with the click | Meta |
msclkid | Microsoft Advertising, when auto-tagging of the MSCLKID is on | Tracking leads with offline conversion goals; the ID is unique for each ad click | Microsoft |
ttclid | TikTok, on a click on an ad | Matching your site’s events with the action on TikTok, for attribution, audiences and delivery | TikTok |
twclid | X, on the landing page URL | Conversion measurement by the X pixel or Conversion API | X |
li_fat_id | LinkedIn, when first-party cookies are on | Conversion tracking, retargeting and analytics |
“Read” here means turn the code into a click, an ad or a campaign. Any script on your page can see the characters in the URL, and you can store them and send them back to the platform. The platform holds the other half.
Sources: Google, GCLID definition and About auto-tagging; Meta, ClickID and the fbp and fbc parameters; Microsoft, AccountProperty; TikTok, About TikTok Click ID; X, Conversion tracking for websites; LinkedIn, first-party cookies and cookie table.
Why a click ID alone names no campaign
Compare the two on one link. The values are made up:
https://example.com/pricing?utm_source=google&utm_medium=cpc&utm_campaign=brand-search&gclid=EXAMPLE123
The first three say where the click came from, that it was paid and which campaign it was. The last one is a key to a record in Google’s systems. Google can look it up, and so can you with access to the ad account: the Google Ads API has a click report that lists gclids with their campaigns, one day at a time and up to 90 days back. A tool without that access sees only a string.
Grouping by a click ID does not help either, because it marks clicks and not campaigns. (Google says the same gclid can be used again when one person clicks the same ad twice, but it still names no campaign.) These numbers are made up to show the difference:
| Landing URL ends in | Visitors | Revenue | What you can say |
|---|---|---|---|
?gclid=EXAMPLE1 | 1 | $49 | One click from Google Ads. Which campaign? Ask Google |
?gclid=EXAMPLE2 | 1 | $0 | Another click. The same campaign or not? Unknown |
?utm_campaign=brand-search | 120 | $588 | $4.90 per visitor |
?utm_campaign=generic-terms | 300 | $294 | $0.98 per visitor |
Why you still need UTM tags
- Every tool can read them. Your analytics, your CRM and your own database see the same campaign name without a call to the ad platform.
- They cover links that are not ads. A newsletter, a partner or a podcast can carry a UTM tag. No ad platform adds a click ID for you there.
- They compare platforms in one report. The same
utm_campaignscheme works on Google, Meta and LinkedIn. A click ID belongs to one platform. - They say paid or not.
utm_medium=cpcseparates an ad from an unpaid link on the same site. - They do not single out a click. Everyone who clicks the ad gets the same tag. Apple names no parameters in its privacy feature, but it aims at identifying ones; see iOS Link Tracking Protection and UTM parameters.
When the click ID is the right tool
UTM tags do not replace click IDs. The platform uses them to match conversions to ads, and Google requires the gclid for its website conversion tracking. Turning them off takes that away from the platform and adds nothing to your own reports, so leave them on. Google Ads can add other parameters next to the gclid; see what gbraid, wbraid and gad_source mean.
What Virling does with each one
The Virling script sends the landing URL. The server reads utm_source, utm_medium, utm_campaign, utm_content and utm_term from its query string, or ref when utm_source is missing, and stores the path without the query. No click ID value is stored, and none decides the channel, source or campaign.
| Click ID | What Virling does with it | Where an untagged click lands |
|---|---|---|
gclid | Nothing. It is not read or stored | Organic search from a Google referrer. With no referrer, Direct |
fbclid | Checks whether it is there, only to label a Direct visit | Social from a Facebook or Instagram referrer, or from an in-app browser that names the app. Otherwise Direct |
msclkid | Nothing. It is not read or stored | Organic search from a Bing referrer. With no referrer, Direct |
ttclid | Checks whether it is there, only to label a Direct visit | Social from tiktok.com or the TikTok in-app browser. Otherwise Direct |
twclid | Checks whether it is there, only to label a Direct visit | Social from t.co, x.com or twitter.com. With no referrer, Direct |
li_fat_id | Checks whether it is there, only to label a Direct visit | Social from a LinkedIn referrer, or from an in-app browser that names LinkedIn. Otherwise Direct |
The label for the four is narrow. When a visit is Direct and its landing URL has fbclid, ttclid, twclid or li_fat_id, it can show under Direct as Shared link instead of Typed or bookmark. A return from checkout comes first, and so does an app the browser names, such as the X app. The visit stays Direct either way, so the label is not a way to count ad clicks. gclid and msclkid are not on that list.
With utm_medium=cpc or paid_social on the link, the same click is Paid, because the medium is checked before the referrer. See how channels are decided.
Tags to add to your ads
Put these where the platform keeps its URL parameters, and leave the click ID for it to add:
Google Ads utm_source=google&utm_medium=cpc&utm_campaign=brand-search Microsoft Ads utm_source=bing&utm_medium=cpc&utm_campaign=brand-search Meta utm_source=facebook&utm_medium=paid_social&utm_campaign=spring-sale TikTok utm_source=tiktok&utm_medium=paid_social&utm_campaign=spring-sale X utm_source=x&utm_medium=paid_social&utm_campaign=spring-sale LinkedIn utm_source=linkedin&utm_medium=paid_social&utm_campaign=spring-sale
Make the links with the UTM builder. For Google Ads, the Google Ads final URL suffix builder also adds ValueTrack parameters. For Microsoft Ads, the Microsoft Ads tracking template and UTM builder adds its URL parameters. The full setups are in Google Ads revenue tracking, Meta Ads revenue tracking, Microsoft Ads revenue tracking and LinkedIn Ads revenue tracking.
Before you share a link copied from your address bar, run it through the URL cleaner. It removes the click ID and the tags, so the next visitor does not arrive with yours.
From the tag to the payment
A campaign name is worth more when it is joined to money. Virling keeps the tags with the visit and joins each payment to the visits before it through a first-party visitor ID, so no click ID is needed. Connect your payment provider and link checkout to visits, and the Campaign tab shows visitors, revenue and revenue per visitor for each utm_campaign.
Frequently asked questions
What is the difference between gclid and UTM tags?
A gclid is a code that Google Ads adds to the landing URL so Google can tie the visit to the ad click. UTM tags are words you choose, such as utm_campaign=brand-search, that any analytics tool can read. The gclid is for Google; the UTM tags are for everyone else.
Do I need UTM tags if auto-tagging is on?
Yes, if you want any tool outside Google to show the campaign. Auto-tagging adds a gclid, which does not name the campaign to other tools. Leave it on for Google and put UTM tags in the final URL suffix.
Can I use a click ID and UTM tags on the same link?
Yes. They are separate query parameters. The ad platform adds the click ID on the click, and the tags come from the URL you set on the ad.
Can I look up a campaign from a gclid?
Only through Google. The Google Ads API has a click report that lists gclids with their campaigns, one day at a time and up to 90 days back, for an account you have access to. Nothing in the code itself spells out the campaign name.
Does Virling read gclid, fbclid or msclkid?
Virling does not read gclid or msclkid. For fbclid, ttclid, twclid and li_fat_id it checks only whether the parameter is there, so a Direct visit can be labelled Shared link. It stores none of their values and none of them decides the channel or campaign.
Is fbclid proof that a visit came from a paid ad?
Do not treat it that way. A link that someone copies from the address bar keeps its fbclid, so a later visitor can arrive with the code from another person's click. Use utm_medium=paid_social to mark the ad.
See the revenue behind every campaign, without click IDs
Virling is open source under AGPL. Self-host it free, or use the hosted version with a 14-day free trial. It connects to Stripe, Paddle, Shopify, WooCommerce, Polar, LemonSqueezy, Dodo, Creem and RevenueCat.