Skip to content
getback
Sell Online · Affiliate Marketing

How Do Affiliate Links Work? Tracking, Cookies and Payouts

How affiliate links work behind the click: tracking IDs, cookies, last-click attribution, server-side tracking and the slow road from sale to payout.

By Updated 9 min read

Quick summary (TL;DR)

  • An affiliate link is a normal product link with your tracking ID added, so the merchant or network can record that a visitor came from you.
  • When someone clicks, the program stores that click, usually in a cookie and increasingly on its own servers, and matches it to any qualifying purchase inside the attribution window.
  • Most programs use last-click attribution: if the shopper later clicks another affiliate's link, the credit usually moves to that affiliate.
  • A tracked sale starts as a pending commission, can be declined for returns or rule breaks, and is paid weeks or months later once you pass the payout minimum.
  • Ad blockers, privacy features and device switching lose some sales, so treat your reports as a floor and test your links regularly.
In this guide
  1. How do affiliate links work, step by step?
  2. What is inside an affiliate link?
  3. How does the merchant know the sale came from you?
  4. What is last-click attribution, and who gets credit?
  5. Why do some clicks never turn into credited sales?
  6. When do you actually get paid?
  7. How can you check that your affiliate links are tracking?
  8. Next steps

Affiliate links work by adding your personal tracking ID to an ordinary product link, so that when someone clicks and buys, the merchant can tell the sale came from you and pay you a commission. So how do affiliate links work in practice? The click is recorded, stored for a set window, matched to a purchase and only then turned into money, weeks or months later.

Most beginners only see the first and last steps: a long link goes out, a smaller-than-expected payment comes back. This guide explains everything in between, so you know why some sales never show up and what you can check yourself.

Every tracked sale follows the same chain. If any link in it breaks, you lose the commission even though the customer bought.

  1. You generate a link in the program's dashboard. It contains your tracking ID.
  2. A reader clicks. The link often passes through the network's tracking server first, which logs the click and assigns it a unique click ID.
  3. The shopper lands on the merchant's site, and the click is stored, usually in a cookie on their browser and, more and more, on the merchant's or network's servers as well.
  4. The shopper buys within the window. The merchant's checkout fires a conversion signal, from a tracking tag on the "thank you" page, a server-to-server message, or both.
  5. The program matches the order to your click and records a pending commission.
  6. The merchant validates the order after the return or cancellation period.
  7. You get paid on the program's schedule once your balance passes its minimum.

Steps 2 to 5 take a few seconds and happen invisibly. Steps 6 and 7 take weeks. If you're still deciding whether this whole model suits you, our beginner's guide to making money with affiliate marketing puts the mechanics in the context of the work involved.

An affiliate link is just a URL with extra information attached. Here's what a typical one carries, using a hypothetical Amazon-style link such as amazon.com/dp/EXAMPLE?tag=yourstore-20 as the model.

PartExample (hypothetical)What it does
DestinationThe product or category pageWhere the shopper ends up
Tracking IDtag=yourstore-20 at Amazon; a publisher ID at a networkTells the program which affiliate account gets credit
Sub-ID or tracking labelA label such as blender-reviewLets you see which page, video or email produced the click
Click IDA random string added by the networkTies one specific click to one specific order
Redirect domainA network's tracking domainLogs the click before forwarding the shopper

Amazon's own help page says your Store ID or Tracking ID most often appears as "&tag=" followed by your ID in the URL, which is a quick way to confirm a link is yours. Networks such as Awin, Impact or CJ use their own formats, but the idea is the same.

Sub-IDs are the part beginners skip and later regret. Without them, you see that you earned something but not which piece of content earned it. Most programs let you create several tracking IDs or labels for free.

How does the merchant know the sale came from you?

It matches the purchase to a stored record of your click. Where that record lives decides how reliable your tracking is.

Cookies

The classic method is a cookie: a small file saved in the shopper's browser when they click, holding your ID and the click time. When they check out, the merchant's site reads it.

  • A first-party cookie is set by the merchant's own domain. Browsers treat it far more kindly.
  • A third-party cookie is set by another domain, such as a network's tracking server. Safari, for one, blocks third-party cookies by default, according to WebKit's tracking prevention documentation.

Server-side tracking

Because browsers increasingly restrict cookies, networks now add server-to-server (S2S) tracking, sometimes called a postback or conversion API. Awin describes S2S as sending conversion data directly from the advertiser's server to Awin's server, bypassing cookies, and says reliable tracking now uses several methods together, which it calls hybrid tracking.

You don't set this up as an affiliate; the merchant does. But it's a fair question to ask before you commit to a program: "Do you use server-side tracking as well as cookies?"

The attribution window

The record only counts for a limited time, the attribution window (often called the cookie duration). Our explainer on what affiliate marketing is covers why window length matters when you compare programs. The mechanics behind it are worth knowing, though, because a window can end early.

Amazon's Commission Income Statement is a precise example. A session starts when the shopper clicks your link and ends at the first of these: 24 hours pass, the shopper places an order, or the shopper clicks another Associate's link. Items added to the cart during your session can still earn if the order is completed no later than 89 days after the original click.

What is last-click attribution, and who gets credit?

Last-click attribution means the affiliate whose link was clicked most recently before the purchase gets the full commission. It is the default in most affiliate programs.

That has practical consequences:

  • Your review can do the persuading and still not get paid. If the shopper later clicks a coupon site's link, the coupon site usually takes the credit.
  • Content close to the purchase wins. Comparisons, "best X for Y" lists and how-to pages that end in a buying decision tend to be the last click more often than general articles.
  • Merchants also compare channels. A merchant may decide that a paid search ad or its own email deserves the credit instead. Awin lists "the commission should have been awarded to a different channel or partner" among the valid reasons for an advertiser to decline a commission, and recommends de-duplication rules to handle it.

Some programs use other models, such as first-click or splitting credit, but they are less common. The program's terms will say which one applies; look for "attribution", "de-duplication" or "last click".

Why do some clicks never turn into credited sales?

Tracking is imperfect, and part of the gap between your clicks and your commissions has nothing to do with your content. The common causes:

CauseWhat happensCan you fix it?
Ad blockers and privacy extensionsThe tracking redirect or tag is blockedNo; server-side tracking on the merchant's side helps
Browser privacy rulesCookies are blocked or expire early; WebKit says ITP deletes cookies created in JavaScript after 7 days without user interactionNo; first-party and S2S tracking help
Switching devicesClick on a phone, purchase on a laptopRarely; logged-in merchant accounts sometimes connect them
Window expiredThe shopper bought after the window closedNo; pick programs with windows that fit your audience
Another affiliate's clickLast click goes to someone elsePartly; be the most useful page near the purchase
Broken or untagged linkThe ID is missing or the product page movedYes; check links regularly
Excluded productsThe item isn't eligible under the program's rulesYes; read the exclusions list

The honest takeaway: your reported sales are a floor, not a precise count. That is normal, and it's one more reason not to judge a channel on its first few weeks of data.

When do you actually get paid?

Much later than the sale. A commission moves through several states before it becomes money in your account.

StageWhat it meansTypical timing
Tracked / pendingThe sale was matched to your clickMinutes to a day after the order
Validated / approvedThe merchant confirmed the order wasn't returned, cancelled or fraudulentAfter the program's validation period, which each program sets
DeclinedThe commission was cancelledAny time during validation
PayableThe approved balance reached the minimum payoutDepends on your volume
PaidMoney sent by bank transfer, check, gift card or another methodOn the program's payment cycle

Two real reference points. Awin says each program has its own validation period, and if a commission isn't reviewed before that period ends, it is approved automatically under the program's auto-validation settings. Amazon Associates says it pays commissions approximately 60 days after the end of the calendar month in which they were earned, and may hold direct deposits until you reach its minimum; our Amazon Associates guide lists the payment thresholds by method.

Example (hypothetical): a reader buys through your link on March 3. The commission shows as pending the same day. If it survives the return period and the program pays about 60 days after month end, it arrives around the start of June. Plan your expectations, and your budget, around that delay.

You can't see the merchant's systems, but you can catch most problems yourself with a short routine.

  1. Click your own link in a private browser window and confirm the address bar shows your tracking ID once you land.
  2. Use the program's link checker if it offers one. Amazon provides a Link Checker for links you create or modify outside its dashboard.
  3. Give every page or channel its own sub-ID so a sudden drop points to a specific link.
  4. Watch clicks against sales. Clicks recorded with zero sales for weeks on a page that used to convert usually means a broken link, an out-of-stock product or a changed program.
  5. Don't buy through your own link to test it. Many programs forbid it, and it can get your account closed.
  6. Re-check after site changes. Theme updates, link plugins and URL shorteners can strip parameters without warning.

Link handling also touches search and the law. Google asks you to mark affiliate links with a specific attribute, explained in our guide to affiliate links and SEO, and you must tell readers in plain words that you earn from them, on every channel where you post links.

Next steps

Now that you know what happens after the click, the practical work is choosing programs with tracking and windows that fit your audience, labelling every link, and checking them on a schedule.

Frequently asked questions

Do affiliate links cost the buyer more?

In most programs, no. The merchant pays the commission out of its marketing budget, and the shopper pays the same price whether or not they used a link.

How does a merchant know a sale came from my link?

Your link carries a tracking ID. When a shopper clicks, the program records the click in a cookie or on its servers, and when a purchase happens inside the window, it matches the order back to your ID.

What happens if someone clicks my link but buys days later?

It depends on the program's attribution window. At Amazon Associates, a session ends after 24 hours, but items added to the cart within that time can still earn if the order is completed no later than 89 days after the click.

Why did my affiliate commission disappear?

Commissions can be declined when an order is cancelled or returned, when another channel or partner should get the credit, or when a sale breaks the program's terms. That is why recent earnings are shown as pending.

Can I check whether my affiliate link is tracking?

Yes. Click your own link and look for your tracking ID in the address bar, and use the program's link checker if it has one. Don't buy through your own link to test it, since many programs forbid that.

Free PDF

Every step to get started, a 7-day plan, the numbers to track and the scams to skip — on two printable pages.

Sources

  1. Amazon Associates — Program Policies and Commission Income Statement
  2. Amazon Associates — Help: checking that your links are tagged
  3. Awin — Understanding affiliate tracking
  4. Awin — Validating transactions
  5. WebKit — Tracking Prevention in WebKit

Getback Editorial Team

We research each guide from official platform documentation and public data, show real costs and trade-offs, and update it when rules change. Read our editorial policy.

Get one honest money idea a week

Practical side-hustle and money guides, costs included. No hype, unsubscribe anytime.