Affiliate attribution explained: last click, first click, windows and coupon codes

Every partner program has a rule for who is paid for a sale. Not every program has written it down, and the day that matters is the day a partner emails: "I sent that customer. Why wasn't I credited?"

This guide explains the rules you choose, what each one does to who gets paid, and how to answer that email with evidence rather than an argument. There is a one-page rules template at the end you can paste into your program terms. If you are setting up a program from scratch, these rules are step 4 of how to start an affiliate program.

Attribution is a rule, not a fact

Tracking records touches: a click on a partner's link, a visit with a partner's code in the address, a discount code typed at checkout, a report from your own server. Attribution is the rule that turns those touches into one decision: which partner, if any, is paid for this sale.

The same touches can produce different answers under different rules, and each answer can be right. Take one customer, Maya:

  • On March 2 she clicks Ana's link in a blog review.
  • On March 20 she clicks Ben's link in a newsletter.
  • On March 25 she buys, and types Ana's discount code at checkout.
Rule Who is paid Why
Last touch, a click beats a code Ben His click is the most recent, and clicks outrank codes
First touch, a click beats a code Ana Her click came first, and 23 days is inside a 30-day window
First touch, a 14-day window, a click beats a code Ben Ana's click expired after 14 days, so Ben's is the only click left
Any model, a code beats a click Ana Her code was typed at checkout

Four reasonable rules, two different partners. Neither partner can argue with the result if the rule was written down before the sale, and both will argue if it was not.

The touches, and what each one can see

A link credits people who click it. The browser remembers the click, so the claim lasts only as long as that browser does: it is lost when the customer clicks on a phone and buys on a laptop, uses a private window, or clears their cookies.

A discount code credits people who type it. It works across devices, and for audiences who never click anything: podcast listeners, video viewers, people a partner talked to in person. Its weakness is that it travels. A code posted on a deals site credits its partner for customers they never met (see affiliate fraud prevention).

Knowing who the customer is joins the two. When a customer signs up or gives an email address, the visits their browser made earlier can be tied to that person, so a later purchase on another device can still be credited.

A correction is a person deciding. It should be rare, written down, and outrank everything else.

Give every partner both a link and a code. The link covers readers who click. The code covers everyone else.

The window

The window is how long after a click a sale can still be credited. A 30-day window credits a sale made 29 days after the click, and not one made on day 31.

Choosing one is a trade:

  • A longer window credits more sales to partners, including sales they had less to do with. It suits expensive purchases people think about for weeks.
  • A shorter window credits partners only for sales that followed their recommendation closely. It suits products people buy on impulse.

If you can, measure how long your own customers take: the number of days from their first visit to their first purchase. Set the window to cover most of them, and no longer.

A window cannot outlive the cookie that carries it. Since 2019, Safari has capped cookies written by a page's own JavaScript at seven days, and at 24 hours when the visitor was sent by a site Safari classifies as able to track across sites, to an address with a query string or fragment. A 30-day window carried only by such a cookie lasts seven days for those visitors. Codes and identified customers are what carry a claim further.

Change the window for new clicks only. A partner who sent a click under a 30-day window was promised 30 days. Shortening it for clicks already recorded changes the terms after the fact.

First touch or last touch

When two partners' clicks are both inside the window:

  • Last touch pays the most recent one. It rewards the partner who closed the sale, and it is the easier rule to explain.
  • First touch pays the partner who introduced the customer, as long as their click is still inside the window. It rewards discovery, which suits a program built on reviews and long-form content.

Some programs split one sale between several partners. It sounds fairer, but every split is a number someone has to explain and every payout becomes a negotiation. For a small program, one winner and a clear rule is usually the better trade.

When a click and a code disagree

The customer clicked one partner's link and typed another partner's code. There are three defensible answers:

  • A click beats a code. The code decides only when nobody clicked. This protects partners who write content from codes that leak to deals sites, where a shopper finds a code at the last moment.
  • A code beats a click. The code typed at checkout decides, even after someone else's click. This suits programs built on podcasts and video, where the audience is told the code out loud.
  • Codes never decide. Codes are discounts only, and attribution comes from clicks. This suits stores whose codes are public promotions.

Returning customers

What happens when a customer who already bought through one partner comes back through another?

  • Every sale is decided on its own. The rules above run again for each sale.
  • The first partner keeps the customer. Whoever won the customer's first sale is credited for every later one.
  • Renewals stay with whoever won the subscription. New purchases are decided on their own, but a subscription's renewals follow the partner who won it, so a subscriber clicking another partner's link cannot move their renewals.

For subscriptions, the third matches a recurring commission: the partner who won the subscription keeps being paid for it, and nobody else is.

When touches compete

Not all touches carry the same weight. Write down an order, such as:

  1. A correction you made by hand.
  2. A sale your own server reported for a partner.
  3. A click on a partner's link, or a visit with a partner's code in the address. Between two of these, the rules above decide.
  4. A discount code typed at checkout.
  5. A partner imported from another system with no newer touch.

The exact order matters less than having one, and having it before the first dispute rather than after.

Shoppers who decline cookies

Where a site asks for consent, a shopper who declines cannot be remembered between pages, and a click on a partner's link carries nothing to the checkout. Some browsers also send Global Privacy Control, a signal asking sites not to sell or share the visitor's data. In California, the Attorney General's guidance is that covered businesses must honor it as a request to stop selling or sharing personal information. Whether partner tracking counts as sharing is a question for your lawyer, and the safe default is to treat the signal as a no.

A discount code still works for these shoppers: it is typed at checkout, and it needs nothing remembered. Tell partners so. "Use your code" is the one piece of advice that credits them whatever the shopper's browser decides.

A sale nobody earned

Some sales come with no partner touch at all. Record them as exactly that, credited to nobody, rather than leaving them out. Then you can see how much of your revenue partners touch, and you have something to correct when a partner turns out to have been involved after all.

Decide two things in advance:

  • How late a claim can arrive. A customer who clicked a link, bought, and only then gave their email address can be tied to their visit afterwards. Decide how long after the sale that may still move the credit.
  • Who may credit a sale by hand, and that every manual credit carries a note saying why.

Settling an "I sent that customer" email

Dana writes: "One of my readers bought last week and I wasn't credited."

1. Find the sale. Ask for the date and anything that identifies the order. Do not ask for the customer's personal details if you can find the order without them.

2. List every touch for that customer. What happened, when, whose, and whether it was inside the window:

When Touch Partner Inside the 30-day window?
September 1 Click on a link Dana Yes, 13 days before the sale
September 12 Click on a link Another partner Yes, 2 days before the sale
September 14 Sale, no code None Not applicable

3. Apply your written rules in order. Under last touch with a click beating a code, the click on September 12 wins.

4. Reply with the evidence, not a verdict. Do not name the other partner.

Hi Dana, thanks for flagging this. For that order we can see a click on your link on September 1, and a click on another partner's link on September 12, two days before the purchase. Our terms credit the most recent partner link clicked within 30 days, so this sale went to the later click. I know that is not the answer you were hoping for. One thing that helps with readers who buy later, or on another device: your discount code. It credits you whenever no other partner's link was clicked before the purchase.

5. If there is no touch at all, say what that usually means: the reader clicked on one device and bought on another, used a private window, or cleared their cookies. Then point them at the code.

6. If the rule gave an unfair result, or tracking failed, correct the sale by hand with a note. A correction should sit on top of the original decision, not erase it, so anyone can see what changed and why. If it moves a commission away from another partner, tell that partner too.

Never change a past decision silently, and never change the rules for sales that have already happened without saying so.

Attribution rules template

Fill in the brackets and paste this into your program terms. Moving from another platform? Compare these with the rules it used before you switch: switching affiliate software explains why.

How sales are credited

A sale is credited to a partner when the customer buys within [30] days of clicking their link, or uses their discount code at checkout.

If the customer clicked more than one partner's link within that time, the [most recent / first] partner is credited.

If the customer clicked one partner's link and used another partner's code, the [click / code] decides.

[Each sale is credited on its own. / A customer's renewals stay with the partner credited for their subscription.]

Sales to people who were already our customers [are / are not] credited.

Shoppers who decline cookies can be credited only through a partner's discount code.

If you think a sale was credited wrongly, tell us within [60] days of the sale. We will show you what we saw for that order and which rule decided it.

How Refficks decides

Refficks is a new partner program platform. Each program's rules are chosen in words on the program's page, and every sale shows which rule decided it.

  • The window and the model. Each program has its own window, 30 days unless you set another, and last touch by default, or first touch.
  • Clicks against codes: "A click beats a code" (the default), "A code beats a click", or "Codes do not decide attribution".
  • Returning customers: "Every sale is decided on its own" (the default), "The first partner keeps the customer", or "Renewals stay with whoever won the subscription".
  • One order when touches compete. A sale you recorded by hand outranks one your server reported, which outranks a click or a visit with a partner's code in the address (those two are level, so the more recent wins). All of them outrank a typed code, which outranks an import.
  • A preview before you change a rule. Refficks shows what the change would have done to your last sales, up to 1,000: how many would have gone to a different partner or to nobody, and what it would have cost in commission. Sales already decided keep their partner.
  • Every sale explains itself. "Why this conversion was attributed" lists every touch it considered, including the ones it set aside and why ("Outside the 30-day attribution window."), the touch that won, and a confidence score with a sentence saying how it was reached: Refficks "takes 10 points off for each other partner with a live claim on the customer". A sale nobody earned says so: "No partner earned this conversion."
  • Corrections never overwrite. "Move this sale" keeps the decision it replaces readable, with your name and your reason, and takes the commission back from the first partner as a new entry rather than an edit.
  • Naming the customer. When your site or your server tells Refficks who a customer is (at signup, say), the visits from that browser are tied to them, so a later purchase under the same email is credited even from another device.
  • Late identification. A sale credited to nobody moves to a partner when the buyer is identified within 24 hours, marked "Credited later". Otherwise you can credit it by hand, with a note saying why.
  • Consent. A browser sending Global Privacy Control gets no cookie and no request. On a site that asks for consent, the script can be set to store nothing until the visitor says yes. A shopper who declines can still be credited through a partner's code, with no visitor, buyer, IP hash, country or device recorded, and that commission waits for a person to approve it.
  • Disputes start in the partner's portal. A partner presses "A sale is missing", you see the sales that might be it, credit or move one, and resolve the query with an outcome they read. Raising a query changes no money by itself.

Start free. No card needed.

Sources

All read on October 16, 2026.