Affiliate Link Tracking: How to Track Clicks, SubIDs and Conversions
A practical guide to affiliate link tracking: how tracking links, click IDs and SubIDs connect a click to a conversion, and how to set it up without losing attribution.
Affiliate link tracking answers one question: which click earned this commission?Get it right and you know exactly which ad, keyword and placement makes money. Get it wrong and every network report looks plausible while your ad account optimizes on nothing.
The three pieces of every tracked click
- The tracking link — the URL a visitor actually clicks. It carries parameters that identify the click.
- The click ID / SubID — a unique value (or set of values) attached to that click, stored by the affiliate network.
- The postback — the server-to-server call the network fires when the conversion happens, echoing your SubID back.
The whole system works because the SubID you put in the link is the same SubID the network returns in the postback. That round-trip is attribution.
A typical flow, end to end
- You create a tracking link:
https://affpixel.com/r/a1B2c3or a direct network link with&sub1={gclid}. - The visitor clicks. Your tracker (or the ad platform) generates the click ID and appends it as a SubID.
- The network records the click with that SubID.
- Days later, the sale is confirmed. The network calls your postback URL with
sub1=…&payout=…. - Your tracker matches the SubID to the original click and forwards the conversion to your ad platform (Meta CAPI, TikTok Events API, Google Ads).
What to put in your SubIDs
Use the network's SubID slots deliberately. A common convention:
sub1— the ad platform click ID (gclid,fbclid,ttclid). This is what lets you push conversions back.sub2— campaign or adset identifier.sub3— creative or placement identifier.
Never put personally identifiable information (email, name, phone) into a SubID — it is stored by the network and visible in reports.
Direct linking vs a redirect tracker
With direct linking, the network's own link does everything and you only receive the postback. With a redirect tracker (like an AffPixel short link), the click passes through your domain first, so you can capture the click ID yourself, log the click, and decide the destination. A tracker is what enables conversion forwarding to ad platforms; if you run paid traffic, you want one.
Common tracking mistakes
- Dropping the click ID — the landing page strips query params on an internal redirect, so
gclidnever reaches the network link. - Hardcoding one SubID — every click shares the same ID, so postbacks can't be matched to clicks.
- URL-encoding bugs — click IDs contain characters that must be encoded; a truncated
gclidis rejected by Google Ads. - Testing only the click — always fire a test conversion through the postback too, end to end.
Set it up in AffPixel
- Create a short link in /shortlinks — the SubID is generated and appended automatically.
- Copy your postback URL from /settings into your affiliate network's postback field.
- Fire a test postback and confirm the conversion appears on the dashboard with the right SubID and payout.
Related reading: SubID Tracking Explained, What Is a Postback URL?