IdentityClick ID Capture

Click ID Capture

Click IDs are the strongest attribution signal for most advertising platforms. When a user clicks an ad, the ad platform appends a unique click identifier to the destination URL. Signal captures these identifiers automatically from URL query parameters on every request, stores them in Redis, and includes them in event payloads delivered to vendor APIs.

How Click IDs Work

When a user clicks an ad on Google, Meta, TikTok, or another platform, the ad network appends a click ID parameter to the destination URL:

https://shop.example.com/products/headphones?gclid=CjwKCAjw...&fbclid=IwAR3x...

This click ID is the ad platform’s record of exactly which ad, campaign, and audience segment led to the click. When the click ID is included in a server-side conversion event, the platform can attribute the conversion back to the specific ad interaction.

Click IDs are more valuable than self-generated browser IDs for attribution purposes because they tie directly to a specific ad click rather than just a browser session.

Supported Click IDs

VendorURL ParameterExample ValueCookieRedis Field
Google AdsgclidCjwKCAjw..._gcl_awgclid
Meta / FacebookfbclidIwAR3x...Used to build _fbcfbclid
TikTokttclidE.CP...ttclid
Pinterestepikdj0y...epik
SnapchatScCidabc123...sccid
LinkedInli_fat_idabc123...li_fat_id

Capture Flow

The Ingestion Gateway captures click IDs on every request that includes a page URL:

1. Browser loads page: https://shop.example.com/?gclid=CjwKCAjw...&fbclid=IwAR3x...
2. Datafly.js sends page event to Ingestion Gateway
   - Event includes context.page.url with the full URL
3. Gateway parses URL query parameters
4. Gateway finds gclid=CjwKCAjw... and fbclid=IwAR3x...
5. Gateway stores both in Redis:
   HSET identity:{anonymous_id} gclid "CjwKCAjw..."
   HSET identity:{anonymous_id} fbclid "IwAR3x..."
6. Gateway sets _gcl_aw cookie (for Google Ads)
7. Gateway builds and sets _fbc cookie (for Meta):
   _fbc = fb.1.{timestamp_ms}.IwAR3x...

Click IDs are captured from the context.page.url field in the event payload, not from the HTTP request URL to the gateway. This means click IDs are captured even on subsequent events if the page URL still contains the parameters.

Datafly.js includes the full page URL (with query parameters) in every event. This means click IDs are captured on the very first event from a landing page, even if the user arrived from an ad and the page loaded before Datafly.js initialised.

The Google Click Identifier is appended by Google Ads to destination URLs when auto-tagging is enabled. It is the primary attribution signal for Google Ads Enhanced Conversions.

URL:     https://shop.example.com/?gclid=CjwKCAjw...
Cookie:  _gcl_aw=GCL.1708876543.CjwKCAjw...
Redis:   gclid → "CjwKCAjw..."
TTL:     90 days

Signal stores the raw gclid value in Redis and also sets the _gcl_aw cookie in the format Google expects: GCL.{timestamp}.{gclid}. The Enhanced Conversions API accepts the raw gclid in the request payload.

Meta / Facebook (fbclid)

The Facebook Click Identifier is appended by Meta Ads to destination URLs. Signal uses it to build the _fbc cookie value, which the Conversions API expects:

URL:     https://shop.example.com/?fbclid=IwAR3x...
Cookie:  _fbc=fb.1.1708876543000.IwAR3x...
Redis:   fbclid → "IwAR3x..."
TTL:     90 days

The _fbc value is constructed from the fbclid parameter combined with a timestamp, following Meta’s documented format. See Self-Generated IDs for the full format specification.

⚠️

The _fbc cookie is only set when fbclid is present in the URL. If a visitor arrives without a fbclid parameter, no _fbc cookie is created. The _fbp (browser ID) cookie is still generated via self-generation regardless of whether a click ID is present.

TikTok (ttclid)

The TikTok Click Identifier is appended by TikTok Ads to destination URLs:

URL:     https://shop.example.com/?ttclid=E.CP...
Redis:   ttclid → "E.CP..."
TTL:     90 days

The TikTok Events API accepts the ttclid value directly in the event payload alongside the self-generated ttp browser ID.

Pinterest (epik)

Pinterest uses the epik parameter for click attribution:

URL:     https://shop.example.com/?epik=dj0y...
Redis:   epik → "dj0y..."
TTL:     90 days

The Pinterest Conversions API accepts the epik value in the click_id field of the event payload.

Snapchat (ScCid)

Snapchat appends the ScCid parameter (note the mixed case) to destination URLs:

URL:     https://shop.example.com/?ScCid=abc123...
Redis:   sccid → "abc123..."
TTL:     90 days

The Snapchat Conversions API accepts this value in the click_id field.

LinkedIn (li_fat_id)

LinkedIn appends the li_fat_id parameter for first-party ad tracking:

URL:     https://shop.example.com/?li_fat_id=abc123...
Redis:   li_fat_id → "abc123..."
TTL:     90 days

The LinkedIn Conversions API accepts this value for click-based attribution.

Multiple Click IDs

A single URL can contain click IDs from multiple vendors. This happens when a user clicks an ad that has been tracked by multiple platforms, or when a URL has been decorated by multiple redirect chains:

https://shop.example.com/?gclid=CjwKCAjw...&fbclid=IwAR3x...&ttclid=E.CP...

Signal captures all click IDs present in the URL simultaneously. Each is stored independently in Redis and delivered to the corresponding vendor:

HSET identity:{anonymous_id} gclid   "CjwKCAjw..."
HSET identity:{anonymous_id} fbclid  "IwAR3x..."
HSET identity:{anonymous_id} ttclid  "E.CP..."

Click ID TTLs

Click IDs represent a specific ad interaction and have limited attribution windows. Signal stores them with TTLs that match vendor expectations:

Click IDTTLReason
gclid90 daysGoogle Ads attribution window
fbclid90 daysMeta attribution window
ttclid90 daysTikTok attribution window
epik90 daysPinterest attribution window
ScCid90 daysSnapchat attribution window
li_fat_id90 daysLinkedIn attribution window

After the TTL expires, the click ID is removed from Redis. If the same visitor clicks another ad later, a new click ID is captured and stored.

⚠️

Click IDs should not be stored beyond their attribution window. Sending an expired click ID to a vendor API may cause the vendor to reject the event or misattribute the conversion. Signal’s TTL management handles this automatically.

Click ID Overwriting

When a visitor arrives via a new ad click for the same vendor, the new click ID replaces the previous one:

Visit 1: ?gclid=CjwKCAjw_old...  →  gclid = "CjwKCAjw_old..."
Visit 2: ?gclid=CjwKCAjw_new...  →  gclid = "CjwKCAjw_new..."  (overwrites)

This matches the standard behaviour of ad platforms: the most recent click is the one used for attribution. Signal always stores and delivers the most recent click ID for each vendor.

Click IDs in Event Delivery

When the Event Processor prepares an event for delivery, it includes any available click IDs for the target vendor:

// Google Ads Enhanced Conversions payload
{
  "gclid": "CjwKCAjw...",
  "conversion_action": "customers/1234567890/conversionActions/9876543210",
  "conversion_date_time": "2026-02-25 14:30:00-05:00",
  "conversion_value": 79.99,
  "currency_code": "USD"
}
// Meta Conversions API payload
{
  "data": [{
    "event_name": "Purchase",
    "event_time": 1708876543,
    "user_data": {
      "fbc": "fb.1.1708876543000.IwAR3x...",
      "fbp": "fb.1.1708876543000.9876543210",
      "client_ip_address": "203.0.113.1",
      "client_user_agent": "Mozilla/5.0 ..."
    },
    "custom_data": {
      "value": 79.99,
      "currency": "USD"
    }
  }]
}

Note how the Meta payload includes both the click ID (fbc, built from fbclid) and the self-generated browser ID (fbp). Signal includes all available identity signals for each vendor to maximise match rates.