Key takeaways
- A click ID is a unique value the platform creates for every click, and it is how a conversion is matched back to that click.
- Sub IDs are your own labels added to a link, such as the page or campaign, which come back in reports and postbacks.
- Never put personal data in either, URL-encode every value, and never credit users based on a sub ID they could edit.
What are click IDs and sub IDs?
A click ID is a unique value that an ad platform or tracker creates for every single click, so a later conversion can be matched to exactly that click. A sub ID is a value you add to a link yourself, such as the name of a page, placement, or campaign, and it is returned to you in reports and postbacks so you can see where results came from. In short: the platform generates the click ID, and you choose the sub IDs.
Click ID vs sub ID at a glance
| Click ID | Sub ID | |
|---|---|---|
| Who creates it | The platform or tracker that records the click | The sender of the traffic, usually a publisher or media buyer |
| Unique per click | Yes, always | No, many clicks share the same value |
| Main job | Match a conversion to its click | Group results by source, page, or campaign |
| Typical names | click_id, cid, transaction_id | sub1 to sub5, s1, subid, aff_sub |
| Where it comes back | In the advertiser’s postback to the platform | In the platform’s reports and postbacks to you |
How click IDs and sub IDs travel in URLs
Both ride along as query parameters. Platforms use macros, placeholders in curly brackets, that are replaced with real values at the moment of the click or the conversion.
- The publisher adds sub IDs to its link. A rewards site might open an offerwall with
?user_id=4821&sub1=homepage&sub2=summer_promo. - The platform records the click. It stores the sub IDs and creates a click ID, then sends the user on to the advertiser’s tracking link, for example
https://track.example.com/start?cid={click_id}, with the macro filled in. - The advertiser keeps the click ID. Its server saves the value with the new user, ready for later.
- The conversion is reported. The advertiser’s server calls the platform’s postback URL with
click_id=and the stored value. - The sub IDs come back. The platform finds the click and its saved sub IDs, and fills them into its postback to the publisher, for example
&src={sub1}, so the publisher sees that this reward came from the homepage summer promotion.
This round trip is the heart of server-to-server tracking. Which macros a postback can carry, and how statuses work, is covered in What is a postback URL?
What click IDs and sub IDs are used for
- Attribution. The click ID ties a sign-up on Friday to the click on Tuesday, without cookies.
- Source reporting. Sub IDs let you split earnings or costs by site, page, placement, campaign, or creative, so you know what to keep and what to cut.
- De-duplication. One click ID can only convert once for each event. A second report of the same event for the same click ID is a duplicate, not a new sale.
- Fraud checks. The click ID lets you compare click time with conversion time. Conversions that arrive seconds after a click, or long after any normal user would act, deserve a closer look.
- Support. When a user says a reward is missing, the click ID or the sub IDs let both sides find the exact click in their logs.
A simple sub ID plan
Decide once what each slot means and stick to it, or your reports turn into a mix of values that cannot be compared. For example:
| Slot | Meaning | Example values |
|---|---|---|
sub1 | Site or app | web, android |
sub2 | Placement | homepage, sidebar, email |
sub3 | Campaign or promotion | summer_promo |
Use short, lowercase values made of letters, numbers, and underscores. They survive every system and are easy to group. If you already tag links for your own analytics, UTM parameters do a similar job inside your own analytics tool, while sub IDs do it inside the partner’s reports and postbacks.
Common click ID and sub ID mistakes
- Personal data in sub IDs. Emails, names, or phone numbers in a URL end up in server logs, analytics tools, and partners’ databases. Use an internal ID that only you can look up instead.
- Overwriting the click ID. A redirect, a second tracker, or a page that generates a new value on every load can replace the stored click ID. Save it once, at the first visit, and do not let later pages change it.
- Reusing a slot for two meanings. If
sub2is a placement this month and a country next month, old and new reports no longer match. - Not URL-encoding values. A space,
&,#, or+in a value can cut it short or create a new parameter. Encode every value you put into a URL. - Macros that were never replaced. If you see
{click_id}literally in your logs, the macro name is wrong for that platform. - Crediting users by a sub ID. Anyone can edit a value in a link. Credit rewards only by a user ID that is protected, for example with a signed link.
- Ignoring limits. Platforms cap the length and allowed characters of sub IDs. A value that breaks the rules may be cut or dropped without warning.
Click IDs and sub IDs on Sharklio
Advertisers running a multi-step offer campaign, available by arrangement with our team, put {click_id} in their tracking link. We fill in a 32-character value that is unique for every user who starts the offer, and your server sends it back in the postback for each step you pay for. Optional macros for the user’s country, device, and traffic source help you compare quality. Task campaigns need no tracking at all: you approve each completion before you pay, at a price you set per country from $0.01. The offer postback docs list every macro. Publishers can add sub1 to sub5, up to 100 characters each, to their offerwall link or Offers API request, get them back in every postback, and group reports by them, as the offerwall link docs show; publisher applications open soon. You can create a free account and your first campaign today.
Frequently asked questions
What is a click ID?
A unique value created for each click on an ad or offer. It is passed to the advertiser in the link and sent back when the user converts, so the conversion can be matched to the click.
What is a sub ID in affiliate marketing?
A label you add to your link, such as the page or campaign the click came from. The network stores it with the click and returns it in reports and postbacks.
What is the difference between sub1 and sub2?
Nothing technical. They are just separate slots. You decide what each one means, for example sub1 for the site and sub2 for the placement.
Can I put a user ID in a sub ID?
You can put an internal, non-personal ID there for reporting. Do not rely on it to credit rewards, because users can change values in a link, and never use an email address.
Are click IDs personal data?
They can be, if they can be linked back to a person. Treat them with the same care as other online identifiers and keep them only as long as you need them.