Click ID, SubID, and Macros in Tracking: How a Tracker Identifies Every Click
What Click ID and SubID are, how they differ, and how macros and parameters work in links — and why this one identifier is what ties a click to a conversion. With URL examples.
Why you even need a click identifier
Imagine 100 people clicked your link in a single day — and, as luck would have it, every one of them is named John Smith. One of them signs up, and the affiliate network fires a postback: "there's a conversion." The question is — which of the hundred John Smiths brought it? From the outside the clicks are indistinguishable, and without a marker there's no way to tell.
To solve this, the tracker assigns every click a unique value at the moment of the redirect — the Click ID. Now it's not "a hundred identical John Smiths" but a specific click #47, with a known source, creative, and funnel. When the postback comes back carrying that same Click ID, the tracker knows exactly which click fired — and ties the conversion to it.
Are Click ID and SubID the same thing?
Yes and no. The confusion comes from the fact that in the Keitaro tracker the Click ID is stored in a parameter called subid — so people who work with this tracker a lot get used to calling the Click ID the "subid." But in most trackers, affiliate networks, and traffic sources, the Click ID is simply called the Click ID.
SubID, on the other hand, more often refers to the additional parameters where you can pass a buyer's or webmaster's ID and other values for a more detailed breakdown of your stats in the affiliate network.
Additional sub-parameters (sub1–sub10) are used to carry extra data through the whole chain: creative ID, placement name, keyword — anything you'll later want to see in a report.
What macros are
A macro is a placeholder in a link that is replaced with a real value on the fly at the moment of the click. It looks like a word in curly or square brackets: {clickid}, {campaign_id}, [GEO], {{ad_id}}.
When a user clicks an ad, the system substitutes the actual data in place of the macro. For example, a link with macros:
https://track.site/click?source={source}&camp={campaign}&creative={creative_id}&geo={geo}
turns, at the moment of the click, into a real URL:
https://track.site/click?source=facebook&camp=12&creative=778&geo=DE
That's exactly how information about where the click came from reaches the tracker. Macros are the "language" ad networks, the tracker, and affiliate networks use to exchange parameters.
What parameters are
A parameter is a "name=value" pair in a link's address. Everything after the ? sign is parameters, separated by the & symbol:
https://track.site/click?source=facebook&campaign=12&geo=DE
Here there are three parameters: source=facebook, campaign=12, and geo=DE. To the left of the = is the name (what you're passing), to the right is the value.
A value can hold:
- a static value — always the same (for example,
geo=DEif you only run traffic to Germany); - a macro — a placeholder that fills the value in automatically at the moment of the click (for example,
geo={geo}— the network inserts the user's country itself).
Through parameters, the tracker, the ad network, and the affiliate network pass all the information about a click to one another. And macros are the way to fill them in dynamically.
How it all connects: the identifier's journey
The end-to-end path of the Click ID through the whole funnel:
- Ad click. The ad network plugs its own macros into the link (source, creative, geo) and sends the user to the tracker.
- The tracker generates a Click ID. Every click is assigned a unique identifier, and all the values from the macros are saved.
- Passing it to the offer. The tracker puts its Click ID into the link to the offer. This is the critical step: if the Click ID isn't passed through, the postback has nothing to attach to a specific click.
- The affiliate network stores the Click ID alongside the user.
- Conversion and postback. On a target action, the affiliate network sends a postback, returning that same Click ID:
?subid={click_id}&status=sale&payout=50. - Matching. The tracker finds the original click by its Click ID and ties the conversion and payout to it.
If the identifier is lost or distorted at any of these steps, the conversion "hangs" and never shows up in your funnel stats.
Common Click ID problems
- The Click ID isn't passed to the offer. Conversions exist in the affiliate network but are missing from the tracker. Check that the offer link actually contains the Click ID macro.
- Parameter name mismatch. The affiliate network expects the Click ID in the
subidparameter, but you're passing it inclickid. - Wrong Click ID format. Some affiliate platforms are sensitive to the Click ID format (they may reject dots or underscores, or enforce length limits). If your tracker's Click ID is long or contains special characters, check with your manager whether their system supports that format.
In short
Click ID (a.k.a. SubID) is a unique marker for a click, parameters are the slots where macros or static values are inserted, and macros are the mechanism that substitutes those values into links. Together they give the tracker the ability to identify every click and tie it to a conversion through a postback.