Skip to content
All articles
6 min read

Click ID vs Sub ID, fbclid, fbc and ttclid

Different click identifiers travel through labeled channels in one attribution system

click_id, sub1, fbclid, fbc, ttclid and transaction_id may appear in the same URL, but they solve different problems. Confusion starts when a campaign ID is used as a unique click, fbclid is treated as the tracker’s primary key, or one click ID is used to deduplicate every purchase.

This guide maps each identifier to its owner, scope and return path.

Identifier map

ValueCreated byIdentifiesWhere to store itWhy return it
Internal click IDTrackerOne tracked clickDedicated field or network sub fieldS2S postback lookup
Sub IDTracker/buyerArbitrary context or containersub1…subN, aff_subSegment reports or carry a click ID
fbclidMetaA Meta ad clickClick record and first-party storageBuild click context for CAPI
fbcSite/integrationMeta click context in cookie formatFirst-party/server storageMeta Conversions API
fbpMeta Pixel/siteMeta browser identifierFirst-party cookieMeta CAPI matching
ttclidTikTokA TikTok ad clickClick record and first-party storageTikTok attribution/Events API
gclidGoogle AdsA Google ad clickClick record/CRMOffline conversion import
Transaction IDNetwork/CRMOne business eventConversion recordDeduplication and correction
Campaign/ad IDsAd platformA group of clicksSeparate dimensionsReporting and breakdowns

Internal click ID: the tracker’s backbone

An internal click ID is created when a visitor passes through the tracking link. It should be unique, immutable and free of personal data. The tracker uses it to connect a later registration or purchase to the original source, campaign, creative, stream and offer.

The value often travels through a generic network field:

https://network.example/offer?aff_sub={click_id}

and returns through a postback:

https://tracker.example/postback?click_id={aff_sub}&status={status}

Names can differ. The actual value must remain unchanged. See Postback URL parameters and macros for the direction-of-ownership model.

Sub ID: a field, not a data type

sub1, sub2, aff_sub and s2 are containers. A team can store an internal click ID, buyer code, placement, creative angle or landing variant in them. “Our click ID is stored in sub2” can be correct; “every sub ID is a click ID” is not.

sub1=facebook_feed is useful segmentation, but it repeats across many visitors and cannot look up one conversion.

fbclid, fbc and fbp

Meta can append fbclid to a landing URL after an ad click. It belongs to Meta’s attribution context, not to your tracker’s internal namespace. A server-side Meta event uses fbc click context in the expected format. fbp supplies browser context.

Preserve both layers:

  1. internal click ID for your own deterministic attribution and postback;
  2. Meta click/browser context for Meta CAPI matching.

Neither fbp nor fbclid is the transaction key. Pixel and CAPI copies of one event also need a coordinated event_id for platform deduplication.

Keep Meta campaign, ad set and ad IDs in separate fields. A practical template is documented in Facebook Ads URL parameters.

ttclid

TikTok defines TTCLID as a click ID appended to the landing URL and used for attribution, measurement, audiences and delivery optimization (official TikTok help). Store it separately from the internal click ID:

internal_click_id = dc_01K2A7M9X4
ttclid           = EAIaIQob...
campaign_id      = 183746...

If a redirect or PWA drops the query string, TikTok context disappears even while your tracker continues counting clicks. Test the full redirect chain. Use the TikTok Ads macro guide for campaign dimensions.

gclid and other platform IDs

Google Ads uses gclid for ad-click attribution and offline conversion workflows. Other platforms have equivalent identifiers. The durable model is:

  • the platform click ID belongs to the ad platform;
  • the internal click ID belongs to your tracker;
  • the click record stores their relationship;
  • the transaction ID belongs to the conversion.

Never fabricate a platform ID. If the platform did not supply one, a random value will not restore attribution.

Transaction ID and event ID

One click can produce several legitimate events:

click dc_01K2A7M9X4
├── registration tx_reg_7719
├── first_deposit tx_dep_8821
└── repeat_deposit tx_dep_9904

A transaction ID distinguishes those events and prevents one network retry from being counted twice. For Browser Pixel plus Meta CAPI, coordinate event_id between the browser and server copies of the same event.

Do not reuse one event ID for a user’s entire lifetime, or real purchases may collapse. Do not generate different IDs for the browser and server copy of one purchase, or the platform may count two events.

UTMs are not click IDs

utm_source, utm_campaign and utm_content describe a channel or grouping. Thousands of visitors can share them. UTMs help reporting, but they cannot deterministically return a delayed conversion to one click.

Use this hierarchy:

  • UTM and campaign/ad IDs: which group and placement;
  • click ID: which exact visit;
  • transaction/event ID: which exact business event.

Example click record

{
  "click_id": "dc_01K2A7M9X4",
  "source": "facebook",
  "campaign_id": "120210001",
  "adset_id": "120210101",
  "ad_id": "120210111",
  "fbclid": "IwY2xjaw...",
  "fbc": "fb.1.1786011100.IwY2xjaw...",
  "sub1": "buyer_07",
  "sub2": "feed_video_a"
}

Do not place email, phone number, name, tokens or other sensitive data in query parameters. URLs routinely appear in access logs, analytics systems, browser history and partner interfaces.

Pass/fail validation

TestPass
Every controlled visit creates a new internal click ID
fbclid or ttclid survives all redirects
Campaign/ad IDs remain separate from the unique click key
Network receives the internal ID in the agreed sub field
Postback returns the exact value unchanged
Every transaction has a stable unique ID
Pixel and CAPI copies share the intended event_id
URLs contain no PII or secrets

FAQ

Are Click ID and Sub ID the same?

No. Click ID describes the unique role of a value. Sub ID describes a flexible storage field that may or may not contain that value.

Do I need an internal click ID when I have fbclid?

Yes. fbclid supports Meta’s attribution; the internal key supports your independent tracking, postback and reconciliation.

Why use a transaction ID when click ID is unique?

One click can produce multiple real events and multiple deliveries of one callback. The transaction ID separates an event from its retry.

Working model

Keep separate columns for separate responsibilities. DarkCore PWA Tracker connects source context, internal click ID and platform identifiers; Conversion Statuses normalize callbacks, and Analytics exposes the result under one explicit model.

  • click id vs sub id
  • what is fbclid
  • fbc facebook
  • ttclid
  • click identifier