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.
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
- How do affiliate links work, step by step?
- What is inside an affiliate link?
- How does the merchant know the sale came from you?
- What is last-click attribution, and who gets credit?
- Why do some clicks never turn into credited sales?
- When do you actually get paid?
- How can you check that your affiliate links are tracking?
- 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.
How do affiliate links work, step by step?
Every tracked sale follows the same chain. If any link in it breaks, you lose the commission even though the customer bought.
- You generate a link in the program's dashboard. It contains your tracking ID.
- 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.
- 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.
- 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.
- The program matches the order to your click and records a pending commission.
- The merchant validates the order after the return or cancellation period.
- 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.
What is inside an affiliate link?
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.
| Part | Example (hypothetical) | What it does |
|---|---|---|
| Destination | The product or category page | Where the shopper ends up |
| Tracking ID | tag=yourstore-20 at Amazon; a publisher ID at a network | Tells the program which affiliate account gets credit |
| Sub-ID or tracking label | A label such as blender-review | Lets you see which page, video or email produced the click |
| Click ID | A random string added by the network | Ties one specific click to one specific order |
| Redirect domain | A network's tracking domain | Logs 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:
| Cause | What happens | Can you fix it? |
|---|---|---|
| Ad blockers and privacy extensions | The tracking redirect or tag is blocked | No; server-side tracking on the merchant's side helps |
| Browser privacy rules | Cookies are blocked or expire early; WebKit says ITP deletes cookies created in JavaScript after 7 days without user interaction | No; first-party and S2S tracking help |
| Switching devices | Click on a phone, purchase on a laptop | Rarely; logged-in merchant accounts sometimes connect them |
| Window expired | The shopper bought after the window closed | No; pick programs with windows that fit your audience |
| Another affiliate's click | Last click goes to someone else | Partly; be the most useful page near the purchase |
| Broken or untagged link | The ID is missing or the product page moved | Yes; check links regularly |
| Excluded products | The item isn't eligible under the program's rules | Yes; 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.
| Stage | What it means | Typical timing |
|---|---|---|
| Tracked / pending | The sale was matched to your click | Minutes to a day after the order |
| Validated / approved | The merchant confirmed the order wasn't returned, cancelled or fraudulent | After the program's validation period, which each program sets |
| Declined | The commission was cancelled | Any time during validation |
| Payable | The approved balance reached the minimum payout | Depends on your volume |
| Paid | Money sent by bank transfer, check, gift card or another method | On 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.
How can you check that your affiliate links are tracking?
You can't see the merchant's systems, but you can catch most problems yourself with a short routine.
- Click your own link in a private browser window and confirm the address bar shows your tracking ID once you land.
- Use the program's link checker if it offers one. Amazon provides a Link Checker for links you create or modify outside its dashboard.
- Give every page or channel its own sub-ID so a sudden drop points to a specific link.
- 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.
- Don't buy through your own link to test it. Many programs forbid it, and it can get your account closed.
- 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.
- For the full picture of how to earn from this, from choosing a niche to promoting links, read our guide on how to make money with affiliate marketing.
- Compare the rules of the main programs in our Amazon Associates guide.
- Still weighing your options? Start with our guide to making money online.
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
The Affiliate Marketing starter checklist
Every step to get started, a 7-day plan, the numbers to track and the scams to skip — on two printable pages.
Sources
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.


