How Affiliate Tracking Works: From Click to Commission

Every affiliate click carries a unique ID through a redirect server that records the visit and matches it to the sale later. Here's exactly how that chain works — and how to test your own links so no…

You pasted the link. Someone clicked. Then what?

That's the question every new publisher asks, usually right after their first click shows up in a dashboard with zero explanation of how it got there. Somewhere between your blog post and the merchant's checkout, a quiet piece of machinery recorded the visit, remembered it for days or weeks, and matched it to a purchase.

This is that machinery, explained plainly. No jargon left undefined, no hand-waving. By the end you'll understand every step from click to commission — and you'll know how to test your own links so a technical glitch never silently eats your earnings.

What's actually inside an affiliate link

An affiliate link looks like an ordinary product URL with clutter attached. That clutter is the entire tracking system. A typical link has three parts:

  • The destination: the merchant's real product or homepage URL.
  • Your affiliate ID: identifies you as the publisher, so the commission has somewhere to go.
  • Tracking parameters: extra fields the network uses to record this specific click — often a program or campaign ID, and space for your own labels (more on those later).

When a reader clicks, they don't go straight to the merchant. They first pass through the network's tracking server — a redirect that takes a fraction of a second. That redirect is where the important work happens: the server generates a unique click ID for this visit, logs the timestamp, the publisher, and the program, and then sends the visitor on to the merchant's site.

That click ID is the thread that ties everything together. Every later event — the purchase, the commission, the payout — references it.

The cookie: how the click gets remembered

A click and a purchase rarely happen in the same minute. Someone clicks your link on Tuesday, thinks about it, and buys on Friday. The system needs memory, and that memory is a cookie.

Here's the simple version:

  • When the visitor passes through the tracking redirect, a small cookie is stored in their browser containing the click ID.
  • When they later complete a purchase on the merchant's site, the merchant's page reads that cookie and reports the click ID back along with the order details.
  • The network matches the order to your click, and the commission lands in your account.

Cookie duration — also called the cookie window or conversion window — is how long that memory lasts. Common durations are 30 days, though programs range from 24 hours to 90 days or more, and a few offer lifetime cookies. If the buyer purchases within the window, you get credited. If they buy on day 31 of a 30-day cookie, you don't. Always check the cookie duration in a program's terms before promoting it: a generous commission rate means little paired with a 24-hour window on a product people research for weeks.

One more distinction worth knowing: first-party vs. third-party cookies. A third-party cookie is set by a domain other than the site you're visiting — historically, the network's domain. Browsers have spent years restricting those, which is why modern tracking leans on first-party cookies (set on the merchant's own domain, often via a tracking subdomain) and on server-to-server methods that don't need browser cookies at all. If you ever wondered why networks talk so much about "cookieless tracking," this is why.

How the sale gets reported back: pixels vs. postbacks

The click is only half the story. The network also needs to hear about the purchase. There are two main ways that happens:

Tracking pixel. A tiny invisible image (or a snippet of JavaScript) placed on the merchant's order-confirmation page. When the page loads after a purchase, the pixel fires: it reads the affiliate cookie from the visitor's browser and tells the network "click ID X just produced an order worth Y." Simple, but it depends on the buyer's browser cooperating — ad blockers and privacy settings can suppress it.

Server-to-server (S2S) postback. The merchant's own server sends a secure message directly to the network's server the moment an order is confirmed: "click ID X converted, order value Y." No browser involved, no cookie to read at checkout, nothing for an ad blocker to stop. This is the most reliable method, and it's become the industry standard for serious programs.

Most networks use a combination: S2S postback as the primary record, pixel as backup.

MethodHow it worksStrengthsWeaknesses
Cookie-based trackingClick ID stored in browser cookie at click time, read at purchaseSimple, works across sessions within the windowBlocked by strict privacy settings; expires with the cookie window
Tracking pixelCode on the confirmation page reports the saleEasy to implement for merchantsCan be blocked by ad blockers; depends on the buyer's browser
Server-to-server postbackMerchant's server notifies the network directlyMost reliable; immune to ad blockers and cookie deletionRequires technical integration by the merchant
First-party / subdomain trackingTracking runs on the merchant's own domainSurvives third-party cookie restrictionsNeeds DNS and setup cooperation from the merchant

Sub-IDs: knowing which link earned what

Your dashboard shows clicks and commissions, but which link drove them? That's what sub-IDs are for. When you generate a tracking link, most networks let you append your own labels — typically called sub-ID, sub1/sub2, or "tracking ID."

Use them to tag placements: one sub-ID for the link in your review's introduction, another for the comparison table, another for your YouTube description. When commissions arrive, the report breaks them down by sub-ID, and you can see exactly which placement earns. Publishers who skip this are flying blind; publishers who use it know precisely which content to double down on.

Attribution: who gets paid when two affiliates were involved

A buyer might click your review on Monday and a coupon site's link on Thursday before purchasing. Both clicks are in the system. Who gets the commission? That's the attribution model, and in affiliate marketing the default answer is simple:

Last click wins. The most recent affiliate click before the purchase gets full credit. This is the standard across the vast majority of affiliate programs and networks, because it's clean to implement and easy for everyone to understand.

Other models exist, though they're the exception in affiliate:

  • First click: credit goes to whoever introduced the buyer. Rare in affiliate, more common in some brand partnership setups.
  • Multi-touch / position-based: credit is split across touchpoints (e.g., 40% first, 40% last, 20% middle). You'll see this discussed in enterprise analytics, but very few affiliate programs actually pay this way.

Why this matters to you: last-click attribution is exactly why coupon and cashback sites cluster at the bottom of the funnel — the final click before checkout is the one that gets paid. As a content publisher, your review may do the persuading while someone else's coupon link takes the commission. Understanding this shapes where you focus: content that captures buyers close to the purchase decision, and programs whose attribution rules you can live with.

Why commissions sometimes disappear: validation, holds, and reversals

New publishers panic the first time a commission vanishes. Usually it's one of three normal things:

  • Validation holds. Commissions typically sit in "pending" status for days or weeks while the merchant confirms the order is real — not cancelled, not returned, not fraudulent. Only after the hold period do they become payable.
  • Reversals. If the buyer returns the product, cancels the order, or the transaction is flagged as fraud, the commission is reversed — removed from your balance. High reversal rates are worth watching; they can signal a merchant with quality problems.
  • Window expiry. The purchase happened after the cookie duration ended. No memory of your click, no commission.

None of this means the system is broken. It's the network protecting advertisers from paying for sales that didn't stick — which, in the long run, is what keeps advertisers funding the channel at all.

Your link-testing checklist

Before you publish any affiliate link, run through this. It takes ten minutes and saves real money:

  1. Click your own link (or use a private browser window) and confirm it lands on the right product page — not a homepage, not a 404.
  2. Check the click registers. Your network dashboard should show the test click within minutes. If it doesn't, the link is malformed.
  3. Verify the sub-ID. Append your test sub-ID and confirm it appears in the click report exactly as you typed it.
  4. Confirm the cookie duration in the program terms, and note it somewhere you'll see when planning content.
  5. Make a test purchase if the program allows it (some prohibit self-purchases — check first). Confirm the conversion tracks and the commission appears as pending.
  6. Re-check quarterly. Merchants redesign sites, migrate platforms, and change tracking setups. A link that worked in January can silently break by June. Spot-check your top earners.

One natural place this all comes together: networks with real-time reporting let you watch test clicks land the moment they happen, which makes this checklist fast instead of a waiting game. AFFNE's dashboard, for instance, shows clicks and conversions as they occur — handy when you're verifying a new batch of links before a post goes live.

The takeaway

Affiliate tracking is just a chain of custody: a unique click ID, a cookie or server record that remembers it, a postback that reports the sale, and attribution rules that decide who gets paid. Nothing magical — but every link in that chain is a place where a commission can leak if you don't understand it.

Learn the mechanics once, test your links as a habit, and you'll never again stare at a dashboard wondering where your money went.

Explore affiliate programs with transparent, real-time tracking through AFFNE's marketplace.