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
| Value | Created by | Identifies | Where to store it | Why return it |
|---|---|---|---|---|
| Internal click ID | Tracker | One tracked click | Dedicated field or network sub field | S2S postback lookup |
| Sub ID | Tracker/buyer | Arbitrary context or container | sub1…subN, aff_sub | Segment reports or carry a click ID |
fbclid | Meta | A Meta ad click | Click record and first-party storage | Build click context for CAPI |
fbc | Site/integration | Meta click context in cookie format | First-party/server storage | Meta Conversions API |
fbp | Meta Pixel/site | Meta browser identifier | First-party cookie | Meta CAPI matching |
ttclid | TikTok | A TikTok ad click | Click record and first-party storage | TikTok attribution/Events API |
gclid | Google Ads | A Google ad click | Click record/CRM | Offline conversion import |
| Transaction ID | Network/CRM | One business event | Conversion record | Deduplication and correction |
| Campaign/ad IDs | Ad platform | A group of clicks | Separate dimensions | Reporting 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:
- internal click ID for your own deterministic attribution and postback;
- 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
| Test | Pass |
|---|---|
| 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.