Guide

Affiliate Tracking and Attribution Explained

How the credit for a sale is decided, where it gets lost, and why server-side stamping matters.

Every affiliate commission you ever earn depends on one question being answered correctly: who sent this buyer? The machinery that answers it is called attribution, and most affiliates never look at it until a month's earnings come in lower than the traffic suggested they should. This guide explains how affiliate tracking actually works, what the attribution models mean, why tracking windows matter, where credit gets silently lost, and what a program that is being straight with you will show you.

Sparta Labs materials are supplied for laboratory and research use only.

What happens when someone clicks your link

The chain is short and every link in it can break.

  1. The click. Your link carries an identifier: a query parameter such as ?ref=yourcode, or a redirect through a tracking domain that appends one.
  2. The stamp. The destination site records that identifier. Traditionally it writes a first-party cookie in the visitor's browser. Better implementations also attach it to a server-side session or, in ecommerce, to the cart record itself.
  3. The gap. The visitor browses, leaves, thinks about it, comes back. This can be minutes or weeks.
  4. The order. At checkout, the store reads the stored identifier and decides which affiliate, if any, gets credit.
  5. The commission record. A commission row is created against that order, with a status, an amount, and a basis.

Attribution is step 4. Everything before it is plumbing whose only job is to make sure step 4 has something accurate to read.

Last-click vs first-click attribution

Attribution models decide what happens when a buyer touched more than one affiliate link before purchasing.

Last-click credits the most recent affiliate link clicked within the tracking window. It is the dominant model across affiliate marketing. Its logic is that the final referral is the one that produced the sale.

First-click credits the earliest affiliate link, on the logic that discovery is what mattered.

Neither is objectively correct, and the argument between them is genuinely unsettled. What matters is the practical consequence for you.

Under last-click, the affiliate who is closest to the transaction wins. That rewards decision-stage content: the comparison page, the specification breakdown, the answer to the last question a buyer had. It also means a coupon extension or a discount site firing at checkout can capture a sale that your review created weeks earlier. Under first-click, discovery content wins, but a first-click program is unusual enough that you should ask why it is being offered.

A third model, multi-touch, splits credit across the path. It is common in large advertising analytics and rare in affiliate programs, because splitting a commission across parties who each expect a full one is operationally painful.

Assume last-click unless you are told otherwise in writing, and build content accordingly: aim to be the final useful thing a buyer reads before they decide.

Tracking windows, and why 30 days is the number that matters

The tracking window (often called cookie length or cookie duration) is how long after the click the stored identifier still earns you credit. When it expires, the sale is attributed to nobody, or to whoever else touched the buyer more recently.

Windows in the wild run from 24 hours to a year. The right question is not "which is biggest" but "does this window cover how my audience actually buys?"

For an impulse purchase, a short window costs little. For anything considered, where the buyer compares suppliers, checks documentation, asks a colleague, and waits for a budget cycle, a short window is a quiet pay cut. The buyer converts. Someone gets paid. It is just not you.

Thirty days is the sensible benchmark for considered purchases, and it is worth being specific about why:

  • It covers a normal deliberation cycle. Research-driven buyers routinely take one to three weeks between first serious look and first order.
  • It survives a weekend and a pay period. Many buyers wait for a specific date. A seven-day window regularly expires in that dead time.
  • It is short enough to actually be honored. Very long windows sound generous but tend to collide with browser cookie lifetime limits (more on that below), so an advertised year is often a technical fiction.
  • It matches how refund and reporting cycles are built, which means programs can implement it honestly rather than approximately.

Ask a second question too: does the window restart on a repeat click? In most programs it does, which rewards continuing to be useful rather than just being first.

Pixel tracking vs server-side attribution

This is the most consequential technical distinction in affiliate tracking, and the one least often explained.

Pixel or client-side tracking. A script or tracking pixel loads in the buyer's browser at checkout, reads the cookie, and fires a request to the affiliate platform reporting the conversion. The browser is doing the reporting. If the script does not load, does not run, or is blocked, the conversion is simply never reported. There is no record anywhere that it should have been. From the affiliate's side, the sale is indistinguishable from a sale that never happened.

Server-side attribution. The referral identifier is captured on the server when the visitor arrives, carried on the session or the cart, and written onto the order record by the store's own backend at the moment the order is created. No browser participation is required at the moment of truth. The order itself carries the attribution as a field.

The difference in reliability is not marginal. Client-side tracking fails in ordinary conditions that a meaningful share of buyers are in: content blockers, privacy-focused browsers, strict tracking-protection settings, network hiccups during checkout, a script that times out on a slow connection.

Server-side attribution also produces a better artifact. Because the referral is stamped on the order, the program can reconstruct exactly which order paid which affiliate and why, months later, without depending on an external platform's log retention. When a discrepancy comes up, there is something authoritative to look at.

The pragmatic version: a pixel-only program is telling you it will pay you for the conversions it happens to hear about. A server-side program is telling you it will pay you for the conversions that happened.

Why attribution still gets lost

Even good tracking loses some credit. Anyone claiming otherwise is selling something. The honest list:

Ad blockers and browser privacy defaults

Content blockers routinely block affiliate and analytics scripts, and several major browsers now cap the lifetime of cookies set by scripts, sometimes to seven days or less, regardless of what the program advertises. A pixel-based program with a 90-day advertised window may be delivering far less than that in practice. Server-side capture at the moment of arrival sidesteps most of this, because the identifier is recorded before any of it matters.

Cross-device journeys

Someone reads your newsletter on a phone at lunch and orders from a work desktop that evening. Unless they were logged in to the same account on both, those are two unrelated visitors. Nothing in ordinary affiliate tracking bridges them. This is a genuine, unavoidable loss.

Cleared cookies, private windows, and new devices

Buyers clear browsing data, use private browsing, or replace a laptop mid-consideration. Any of these erases the stamp.

Long consideration cycles

If the deliberation is longer than the window, the credit is gone by the time they buy. This is the failure a 30-day window is specifically designed to reduce.

Later clicks overwriting yours

Under last-click, any subsequent affiliate link, including a coupon site the buyer opens at checkout, replaces you. Worth knowing when you consider how many programs to promote at once: you can overwrite your own credit by sending a buyer to a second merchant mid-decision.

Direct navigation

The buyer remembers the brand, types the domain, and orders. No link, no attribution. This is the invisible tax on doing genuinely good brand-building work, and no tracking system solves it.

A realistic expectation: some fraction of the sales you truly influence will never be credited to you. The goal is not perfection. It is a program whose losses come from the physics of the web rather than from its own reporting choices.

What a transparent program shows you

You should be able to see, without asking:

  • Clicks, with timestamps, so you can correlate them with your own analytics and notice when tracking breaks.
  • Conversions at order level, not one aggregate number. Each referred order should appear as its own row.
  • The commission basis on each row: what the percentage was applied to, so you can check the arithmetic.
  • Status per commission, and the dates it changed. Pending, payable, paid, reversed.
  • Reversals shown explicitly, tied to the refund that caused them, rather than a balance that quietly shrinks.
  • The attribution model and window stated in the written terms, not just in marketing copy.

The single most useful test: can you take one order in the dashboard and trace it back to a click, a rate, a basis, and a status? If yes, the program can be audited. If the dashboard is a lump sum, you are trusting rather than verifying, and you will not be able to tell a slow month from a broken pixel.

How Sparta Labs handles attribution

We built this the way the section above describes, and the server-side piece is the part worth understanding.

  • Last-click, 30-day window. The most recent affiliate referral within 30 days of the order receives credit.
  • Stamped on the order server-side. When a referred visitor arrives, the referral is captured server-side and carried through to checkout, where it is written onto the order record itself by our backend. It does not depend on a tracking pixel firing in the buyer's browser at the moment of purchase, so a blocked script or a privacy-hardened browser does not silently erase your commission. The order permanently carries who referred it.
  • Order-level reporting. Clicks, conversions, and every commission with its own status.
  • Explicit commission lifecycle. Commissions accrue as pending, clear a 30-day refund hold, become payable, then paid. Refunds and cancellations reverse them proportionally to the amount refunded.
  • A basis you can verify. Commission is a percentage of the order subtotal, calculated pre-tax, pre-shipping, and before any discounts. Because the basis excludes discounts, a promo code applied at checkout does not reduce what you earn.
  • Rates that ratchet. 15% from your first referred order with no volume gate, 18% after $5,000 in cumulative referred sales, 20% after $20,000. Cumulative and sticky: the rate never drops once earned, and a refund cannot demote you. Tier is evaluated on volume accrued before each order, so it applies forward and is never retroactive.
  • Weekly payouts, $50 minimum, via ACH, Zelle, Venmo, Cash App, or crypto (BTC, ETH, USDC). No PayPal. W-9 before your first payout, 1099-NEC at $600 or more per year.

For scale rather than promise: across live commission records the average referred order is roughly $184 in subtotal, so a typical referral pays about $28 at the 15% rate. Figures are illustrative and depend entirely on your audience. Nothing here is an earnings guarantee.

Practical ways to protect your attribution

  • Audit your links periodically. Site restructures break affiliate URLs, and a broken link tracks nothing while still looking clickable.
  • Do not strip the tracking parameter. Shorteners, CMS plugins, and some social platforms rewrite URLs. Test the final landing URL, not the one you pasted.
  • Give the last click a reason to be yours. Under last-click, being the last genuinely useful page before the decision is the whole game.
  • Correlate clicks with your own analytics. If your traffic to a link is steady and reported clicks fall off a cliff, tracking broke, and you want to know that in week one, not at payout.
  • Read the written terms for the model, the window, the basis, and the reversal policy. If the marketing page and the terms disagree, the terms are what you will be paid on.

The mechanics above are documented in the affiliate terms, and if you want the wider evaluation checklist, see how to choose an affiliate program. If you have an audience that sources research materials, you can apply to the affiliate program. Applications are reviewed manually.

Sparta Labs materials are supplied strictly for laboratory and research use, and affiliate content must stay within that framing: sourcing, testing documentation, catalog availability, and program mechanics, never claims about effects in people.


Sparta Labs products are supplied for laboratory and research use only. They are not intended for human or veterinary use, diagnostic use, or as food or drugs.

Military 30%Sparta Rewards