← All articles
5 min read

SubID Tracking Explained: How Click IDs Power Attribution

SubIDs are the duct tape of affiliate attribution. Learn what they are, how to use them to carry click IDs through to your postback, and how to avoid the common collisions.

A SubID is a freeform value you attach to an affiliate link. The network stores it against the click and echoes it back in the postback. That's how the ad-platform click ID makes the round trip from your landing page to your attribution endpoint.

The three things SubIDs are used for

  • Click ID passthrough: store fbclid/gclid so postbacks can rebuild fbc / call OCI.
  • Source attribution: tag the campaign, creative, or placement so you can break down conversions in your reports.
  • Idempotency: pair a session ID with the click ID so retries don't double-count.

How many SubIDs do you get?

Most networks give you 1–5 slots: subId1, subId2, etc. Plan slot usage before you launch — once a campaign is live, swapping slots breaks historical reporting.

Suggested slot layout

  • subId1: ad-platform click ID (the one you'll forward).
  • subId2: campaign / ad-set name.
  • subId3: creative ID.
  • subId4: geo / device / cohort tag.
  • subId5: session ID for deduping.

Encoding rules

Always URL-encode the value before adding it to the affiliate link. Most networks do not auto-encode and a single % or & can break the postback parse.

Length limits

  • Impact: 256 chars per slot.
  • PartnerStack: up to ~512 in custom.
  • Smaller networks: often 64 chars. Test before going live.

Don't pack JSON into a SubID

Tempting, but networks log SubIDs in dashboards and analytics — long JSON blobs get truncated, escaped, or rejected. Use one value per slot and let your postback endpoint do the joining.