Affiliate Cookie Duration: How Long Should Your Window Be?
Anderro · · 6 min read
Set your affiliate cookie duration to cover your free trial plus the time a typical buyer takes to decide after it ends. For most SaaS products with a 14-day trial, that makes 30 days the floor. If you sell annual plans, run demos, or have a buying committee on the other side, 60 to 90 days is the right range.
Anything shorter quietly cheats affiliates out of sales they drove, and they notice. Anything much longer starts paying commission on customers who would have found you anyway. The rest of this post is the reasoning, the numbers, and the cases where the rule bends.
The rule: trial length plus decision time
A cookie window is the period after a click during which a purchase still credits the affiliate. The mistake I see most often is a founder picking 30 days because it sounds standard, without checking it against their own funnel.
Walk through a typical journey for a product with a 14-day trial:
- Day 0: the visitor clicks a review site's link and reads your pricing page.
- Day 4: they come back and start the trial.
- Day 18: the trial ends. They are busy and let it lapse.
- Day 25: they return and enter a card.
That sale lands at day 25. A 30-day window catches it with five days to spare. A 14-day window, which some programs still use, misses it entirely, and the affiliate who sent a ready buyer earns nothing.
Now change the product. You sell a $3,000/yr plan, and buyers book a demo, loop in finance and sign three to seven weeks after the first click. Day-50 purchases are normal here. A 30-day window would miss a large share of genuine referrals, which is why 60 to 90 days belongs to annual and sales-assisted plans.
Don't guess. Pull signup-to-first-payment times for your last 100 to 200 paying customers, add the typical gap between first visit and signup if your analytics shows it, and look at the 80th percentile. If you have 200 customers and the 160th-fastest converted at day 26, a 30-day window covers four out of five buyers. Covering the slowest 5% is rarely worth what it costs.
What a too-long window costs you
A generous window feels free. It isn't. Every day you add extends the period in which someone who clicked an affiliate link months ago, forgot about it, and later arrived through your own content still counts as a referral.
Here is the math. Say your plan is $49/mo and you pay 30% recurring. Each attributed customer earns the affiliate $14.70 a month, or $176.40 in their first year. Suppose moving from a 30-day to a 90-day window credits 10 extra customers per year who had already decided to buy through other channels. That is $1,764 a year in commission for no incremental revenue, and it compounds every year those customers stay.
At a 20% rate the same 10 customers cost $117.60 each, or $1,176 a year. The higher your rate, the more a lazy window hurts, which is why window length and commission rate should be decided together.
There is also a fraud angle. Long windows reward cookie stuffing: dropping referral cookies on visitors who never meant to click. The longer the cookie lives, the more likely a stuffed cookie collects on an organic sale. The controls are covered in Affiliate Fraud Detection for SaaS: Six Patterns, Six Controls, but the simplest one is a window no longer than your buyers need.
My own rule of thumb: never set the window more than about 1.5x your measured 80th percentile. If buyers convert by day 40, a 60-day window is generous. A 180-day one is a giveaway.
First click vs last click
The window decides how long a click counts. The attribution model decides which affiliate gets paid when a buyer clicks more than one link.
| Model | Who gets credit | Affiliates who like it |
|---|---|---|
| Last click | The most recent affiliate link before purchase | Coupon and deal sites, retargeting-heavy partners |
| First click | The first affiliate link inside the window | Bloggers, YouTubers, newsletter writers, comparison sites |
Last click is the most common default, and it is a reasonable one. It is simple to explain and rewards the partner who closed the deal.
Its weakness shows up when a coupon site sits at the bottom of your funnel. A YouTuber's tutorial convinces someone on day 2, they search "yourproduct discount code" on day 20, click a coupon site's link, and the coupon site takes the full commission. The person who did the persuading gets nothing. Do that to content creators a few times and they stop recommending you.
Most serious affiliates prefer first click, because the ones worth recruiting create demand rather than intercept it. My recommendation: start with last click. If you see coupon or deal sites repeatedly closing sales that a content affiliate opened, switch to first click. Pair first click with a window that matches your funnel, because first click plus a very long window locks credit to whoever touched the buyer earliest, even if that touch was months ago and barely mattered.
Why the cookie often dies before the window does
You can set a 90-day window and still lose attribution on day 3. The window is a ceiling on how long you will honor a click, not a guarantee the browser keeps the cookie.
Three things erode it:
- Browser privacy features. Safari's Intelligent Tracking Prevention can significantly shorten the life of cookies set by JavaScript, often to around a week or less. Other browsers have moved in a similar direction.
- Ad and tracker blockers. Some block the tracking script outright, so the click is never recorded.
- Device switching. Someone reads a review on their phone at lunch and signs up on their laptop that evening. Different browser, no cookie.
The fix is to stop depending on the cookie for longer than you must. A sturdy setup captures the referral as early as possible and stores it on your side: write the referral ID into your own user record or billing customer metadata at signup, then create the commission from the payment event on your server. The cookie then only needs to survive from click to signup, which is usually hours or days, not from click to payment.
This is how Anderro handles it: a JS snippet records clicks, but commissions are only created from trusted server-side sources such as Stripe charge and invoice.paid events, signed Paddle Billing webhooks, SamCart webhooks, the WooCommerce plugin, or the server API with a secret key. A payment reported by the browser never creates a commission, which closes off a whole class of fake-sale fraud too.
Settings by plan type, and the edge cases
Here is where I would start, then adjust with your own conversion data:
| Your model | Starting window | Attribution |
|---|---|---|
| Monthly plan, no trial, self-serve | 30 days | Last click |
| 14-day trial, monthly plan | 30 days | Last click |
| 30-day trial or annual-first pricing | 60 days | Last or first click |
| Demo-led, sales-assisted, $2k+/yr | 90 days | First click |
Edge cases that break the rule:
- Freemium. Free users may upgrade six months later. No reasonable cookie covers that, so attribute at signup and decide in your terms whether an upgrade months later earns commission.
- Cycles longer than 90 days. Most platforms cap the window somewhere. In Anderro the cookie window can be set from 7 to 90 days (default 30), with last-click or first-click attribution, so any result in that range can be matched. Enterprise cycles beyond 90 days need another approach, such as attributing at signup or demo request, or giving affiliates coupon codes that tie the sale back to them at checkout.
- Changing the window later. Apply changes to new clicks only, and tell affiliates before you shorten anything. Cutting a window mid-campaign is the fastest way to lose your best partners.
If you are still setting the program up, the window is one decision in a longer sequence covered in How to Start an Affiliate Program for Your SaaS, in Order.
This week, pull first-click-to-payment times for your last 100 paying customers, find the 80th percentile, and set your window to that number rounded up to the next 30 days. Revisit it once you have six months of affiliate sales to check against.
Frequently asked questions
Does a longer cookie window attract more affiliates?
It helps at the margin, especially with content creators who compare programs side by side, but it rarely beats commission rate, product quality and payout reliability. Affiliates care more about whether their referrals actually get tracked. A 30-day window with server-side payment matching often pays out more than a 90-day window that relies on a browser cookie surviving for weeks.
Does the cookie window limit recurring commissions?
No. The window only decides whether the first conversion is credited to the affiliate. Once a customer is attributed, recurring commissions follow your program terms, usually for every payment that customer makes or for a fixed number of months. A customer who buys on day 25 of a 30-day window earns the affiliate the same recurring commission as one who buys on day 1.
Should I offer a lifetime cookie?
In my judgment, no. A lifetime cookie means any customer who ever clicked an affiliate link, even years ago, pays commission forever, including buyers who came back through your own marketing. It also makes cookie stuffing far more profitable. If you want to reward long-term influence, attribute at signup and pay recurring commission instead of extending the cookie indefinitely.
Can I use coupon codes instead of cookies for attribution?
Coupon codes are a useful backup, not a replacement. They survive device switches and blocked cookies because the buyer types them at checkout. The downside is that codes leak onto coupon aggregator sites, which then collect commission on sales they did not drive. If you use them, give each affiliate a unique code and watch for codes appearing on deal sites.
How do I explain my cookie window in affiliate terms?
State the window length, the attribution model, and what happens on edge cases in plain language. For example: a referral is credited if the customer pays within 30 days of their last click on your link, and changes to the window apply to new clicks only. Clear terms prevent disputes and make your program easier to compare favorably against others.
Run your affiliate program on Anderro
Stripe, Paddle and SamCart tracking, recurring commissions, refund clawbacks and fraud checks on every plan. 14-day trial.
Start your trial