Blog
Playbook

How long should an affiliate cookie last? 30, 60 or 90 days

A worked model of how many signups a 30, 60 or 90-day affiliate cookie credits, B2B vs B2C, the Safari cap, why coupons matter, and what longer windows cost.

Sep 28, 2026 · 11 min read · RelayWonder
clickday 30day 60day 90referral window: a signup here is creditedoutside the window

For most SaaS products, an affiliate cookie duration of 60 days is a sound default: in our illustrative model it credits about 94% of partner-driven signups for a fast self-serve product and about 78% for a slower B2B product, against 87% and 60% with a 30-day window. Going from 60 to 90 days adds only 4 points in the fast case but 12 points in the slow case, so the right answer depends on how long your buyers take to decide. The window you promise is also not the window every browser keeps: Safari deletes cookies written by JavaScript after 7 days without interaction, which is why personal coupon codes matter as much as the number of days. This post builds the model step by step so you can rerun it with your own data.

What an affiliate cookie duration actually controls

The cookie window, also called the referral window, is the maximum time between a visitor clicking a partner's link and that visitor signing up or paying, for the signup to still be credited to the partner. A click on day 0 with a 60-day window credits a signup on day 59 and does not credit one on day 61. It is a rule about credit, not about tracking technology: the cookie is just the most common way to remember the click.

Two details change how the rule plays out. First, most programs restart the window on each new click from the same partner, so a visitor who clicks again on day 40 gets a fresh 60 days. Second, with last-touch attribution a click from a different partner replaces the first one. Neither detail changes the basic question this post answers: what share of the signups a partner actually caused will be credited under a given number of days?

For context on what is normal elsewhere, Google Ads uses a 30-day click-through conversion window by default and lets advertisers set it anywhere up to 30, 60 or 90 days depending on the conversion source [1]. Affiliate programs tend to be more generous than ad platforms because a partner's content often starts a longer evaluation than an ad click does.

clickday 30day 60day 90referral window: a signup here is creditedoutside the window
A timeline from a partner click on day 0 through days 30, 60 and 90, with signups plotted as dots and the windows drawn as brackets showing which dots each window credits.

Modelling time from click to signup

The share of credited signups depends entirely on one distribution: among visitors who eventually sign up after a partner click, how many days pass between the click and the signup? You can measure this from your own data once you have a few hundred attributed signups. Before that, a plausible illustrative distribution is enough to reason about the trade-off. We use two, one for a fast self-serve product and one for a slower team or B2B product. These are not industry statistics; they are assumptions chosen to show the shape of the decision.

Illustrative example: assumed share of eventual partner-driven signups by days after the click. Replace with your own measured distribution.
Days from click to signupFast self-serve productSlower B2B product
0–150%20%
2–720%15%
8–3017%25%
31–607%18%
61–904%12%
More than 902%10%
Total100%100%

Reading the table: in the fast case, half of all eventual signups happen on the day of the click or the next day, and only 2% take longer than three months. In the B2B case, only a fifth sign up that quickly, and one in ten takes more than 90 days, which is typical of products that need a trial, a team discussion or a budget approval before anyone pays.

30 vs 60 vs 90-day cookie window: the credited share

The credited share under a window of N days is the cumulative share of signups that happen within N days. Add the rows up to and including the window.

  • Fast product, 30 days: 50% + 20% + 17% = 87%. 60 days: 87% + 7% = 94%. 90 days: 94% + 4% = 98%.
  • B2B product, 30 days: 20% + 15% + 25% = 60%. 60 days: 60% + 18% = 78%. 90 days: 78% + 12% = 90%.

The marginal gain shrinks as the window grows, but how fast it shrinks depends on the product. For the fast product, moving from 30 to 60 days adds 7 points and from 60 to 90 adds 4. For the B2B product the same moves add 18 and 12 points. A B2B partner on a 30-day window loses credit for 40% of the customers they caused. That is the number to look at when a partner says your window is too short.

This is also why the same window can be generous for one brand and stingy for another. A 30-day affiliate cookie duration on a consumer app where most people decide in a day is close to complete. The same 30 days on a tool that sells to teams leaves a large share of the partner's work unpaid, and experienced B2B partners know it.

What browsers do to a 60-day cookie

So far the model assumes the cookie survives for the full window. It does not always. Safari's tracking prevention caps the expiry of persistent cookies created through document.cookie at seven days [2], and WebKit describes this as deleting script-written cookies and other script-writeable storage after 7 days without user interaction with the site. It can go further: when a site classified as having cross-site tracking capabilities navigates the user to your page and the URL carries a query string or fragment, cookies created by JavaScript on that landing page are capped at 24 hours [3]. Chrome also has an upper limit, but a far longer one: since Chrome 104 in August 2022, no cookie can be set to expire more than 400 days in the future [4].

A tracking script that writes the referral cookie from JavaScript on your site is therefore subject to the 7-day cap in Safari. To see what that does to the model, assume, purely for illustration, that 30% of visitors arriving from partner links use Safari and that for them only signups within 7 days are credited by the cookie. Your real share will differ; check it in your own analytics.

Illustrative example: credited share when 30% of visitors only keep the cookie 7 days. Within 7 days: 70% (fast) and 35% (B2B) of signups, from the distribution table above.
WindowFast product, no capFast product, 30% SafariB2B, no capB2B, 30% Safari
30 days87%0.7 × 87 + 0.3 × 70 ≈ 81.9%60%0.7 × 60 + 0.3 × 35 = 52.5%
60 days94%0.7 × 94 + 0.3 × 70 ≈ 86.8%78%0.7 × 78 + 0.3 × 35 ≈ 65.1%
90 days98%0.7 × 98 + 0.3 × 70 ≈ 89.6%90%0.7 × 90 + 0.3 × 35 = 73.5%

Two things stand out. The cap hurts the B2B product much more, because its signups happen later. And the cap shrinks the benefit of a longer window: in the B2B case, going from 60 to 90 days adds 8.4 points instead of 12, because the extra days are invisible for the Safari share. A longer promised window does not fix a cookie that the browser removes after a week.

public information only · dated
Two bars per window for a B2B product, one showing the credited share when every browser keeps the cookie and one when 30% of visitors keep it for only 7 days.

Why coupon codes matter more than extra days

A personal coupon code attributes a signup without any cookie. If the partner's audience types the partner's code at checkout, the signup is credited whenever it happens, whichever browser was used and however many devices were involved. In Stripe, a promotion code is the customer-facing string that wraps a coupon, and many codes can point to one coupon [5], so giving every partner their own code costs nothing in discount design.

To put a number on it, assume, again for illustration, that 40% of the partner-driven signups that the cookie fails to credit use the partner's code instead. That covers both signups after the window and signups whose cookie Safari removed. For the B2B product with 30% Safari, the uncredited share at 60 days is 100% − 65.1% = 34.9%. Forty percent of that is about 14.0 points, so the credited share rises to about 79.1%. At 30 days: 52.5% + 0.4 × 47.5% = 71.5%. At 90 days: 73.5% + 0.4 × 26.5% = 84.1%.

Compare the two levers. In this example, a coupon at 30 days (71.5%) beats a 60-day window without a coupon (65.1%), and a coupon at 60 days (79.1%) beats a 90-day window without one (73.5%). The actual share of buyers who use a code depends heavily on the partner type: it tends to be higher for podcasts and videos where the audience hears the code, and lower for comparison articles where people click. But the direction is consistent: coupons recover the signups that no number of days can.

SARAH10attributes the sale with no click and no cookievideo → memory → Google → checkout
A checkout form with a partner's personal code entered in the promotion code field, crediting the signup to that partner without a click.

What a longer cookie window costs

A longer window means you pay commission on more customers. Whether that is a cost or just fair payment depends on whether those late customers were really caused by the partner. Start with the arithmetic. Take 100 eventual partner-driven signups on the B2B product, ignore the browser cap, and value each credited customer at about $90 of expected commission, which is 20% of a $49 monthly plan for 12 months at 5% monthly churn: (1 − 0.95¹²) ÷ 0.05 ≈ 9.2 invoices × $9.80.

Illustrative example: B2B distribution above, no browser cap, $90 expected commission per credited customer (20% of $49 for 12 months at 5% monthly churn).
WindowCredited customers (of 100)Expected commissionAdded vs previous window
30 days6060 × $90 = $5,400—
60 days7878 × $90 = $7,020+$1,620
90 days9090 × $90 = $8,100+$1,080

Each extra credited customer also brings you about 9.2 × $49 ≈ $450 of revenue in the same 12 months, so commission stays at 20% of the revenue from those customers. The longer window does not change your margin per customer. What it changes is how many customers you share. The honest question is overlap: the longer the gap between click and signup, the more likely another channel, a search ad, a sales call, a conference, also touched that customer. With last-touch attribution among partners, a partner click on day 1 still wins a signup on day 80 that came through your own paid search ad, unless your setup lets later non-partner touches override it.

So the cost of a longer window is not the commission itself. It is the commission on customers who would have come anyway. You cannot measure that precisely, but you can bound it: look at the late signups, those after day 30, and check how many of them also arrived through another paid channel before signing up. If that share is small, a longer window is mostly paying partners for real work.

EPCcommission ÷ clicksConversioncustomers ÷ clicksPayout ratiocommission ÷ revenueActive rateactive ÷ approved
Metric cards showing credited signups, average days from click to signup, and the share of signups attributed through coupon codes for a partner program.

B2B vs B2C: how to pick your affiliate cookie duration

Pull the model together into a decision rule. The goal is a window that credits most of what partners cause without paying for customers they did not influence.

  1. If most of your customers sign up within a week of first visiting, as with low-priced consumer apps, 30 days already credits close to 90% in the model. 60 days is a friendly default that costs little extra.
  2. If you sell to teams, have a trial longer than a week or need approval from someone other than the first visitor, use at least 60 days. In the B2B model, 30 days leaves 40% of partner-caused signups uncredited.
  3. If your sales cycle regularly runs past two months, 90 days is justified, but pair it with coupon codes, because the browser cap removes much of the benefit of the extra days.
  4. Whatever you choose, give every partner a personal code and say on your terms page that code purchases are credited without a click.
  5. After three to six months, measure your real time-to-signup distribution from attributed customers and rerun the arithmetic above. Change the window if the data says so, with notice to partners.

RelayWonder programs default to a 60-day referral window with last-touch attribution, and brands can change it per program. Personal partner codes are Stripe promotion codes, so a code purchase is attributed even when no cookie exists. The tracking script writes the referral cookie on your own domain and passes the referral id to Stripe Checkout as client_reference_id, a field Stripe documents as a reference to reconcile the session with your systems, up to 200 characters [6]. That way the attribution is stored with the payment itself once the customer checks out.

How to measure your own time to signup

You need two timestamps per attributed customer: the click and the signup. Most tracking tools store both. Export them, compute the difference in days, and bucket the results into the same ranges as the table above. A few hundred customers are enough for a stable shape.

  • Use the click that won the attribution, not the first click ever, if your window restarts on new clicks.
  • Separate code-attributed signups, which have no click, from link-attributed ones. Their share is the coupon effect.
  • Split by partner type if you can. Video and podcast audiences often behave differently from search-driven readers.
  • Remember that signups after your current window are invisible in the data. If your window is 30 days, you cannot see the 31–60 bucket from attributed data; estimate it from customers who report a partner as their source in an onboarding question.

FAQ

What is a good affiliate cookie duration for SaaS?

60 days is a sound default for most SaaS products. In an illustrative model it credits about 94% of partner-driven signups for a fast self-serve product and about 78% for a slower B2B product, compared with 87% and 60% at 30 days. Products with long sales cycles can justify 90 days.

Is a 90-day cookie window always better than 60 days?

Not always. For a product where most buyers decide within a week, 90 days adds only about 4 points of credited signups over 60 in the model. Browser caps also reduce the gain, because Safari removes JavaScript cookies after 7 days without interaction.

Does Safari really delete affiliate cookies after 7 days?

Safari caps cookies created through document.cookie at a 7-day expiry, and can cap them at 24 hours when a known tracking site sends the visitor with a decorated URL. That applies to referral cookies written by a tracking script. Coupons and passing the referral id into checkout reduce the impact.

How do coupon codes help with short cookie windows?

A personal code attributes the signup at checkout without any cookie, so it works after the window ends and across browsers and devices. In the illustrative B2B model, adding codes used by 40% of otherwise lost signups lifts a 60-day window from about 65% to about 79% credited.

Does a longer cookie window increase my commission cost?

It increases how many customers you share, not your rate per customer. In the B2B example with 100 signups and $90 expected commission each, moving from 30 to 60 days adds about $1,620 in commission and those 18 customers bring about $8,100 in 12-month revenue. The real cost is paying for customers another channel would have brought anyway.

What is the maximum cookie duration a browser allows?

Chrome caps any cookie expiry at 400 days from when it is set, since Chrome 104 in August 2022. Safari applies much shorter caps to cookies written by JavaScript. In practice, windows of 30 to 90 days are well under the Chrome limit.

Sources

  1. Google Ads Help: About conversion windows · Default click-through conversion window of 30 days, configurable up to 30, 60 or 90 days. Checked October 2026.
  2. WebKit: Intelligent Tracking Prevention 2.1 · Persistent cookies created through document.cookie capped to a seven-day expiry (February 2019). Checked October 2026.
  3. WebKit: Intelligent Tracking Prevention 2.2 · One-day cap when a classified domain navigates the user and the URL has a query string or fragment (April 2019). Checked October 2026.
  4. Chrome for Developers: Cookie Expires and Max-Age attributes now have upper limit · 400-day maximum cookie expiry since Chrome M104, August 2022. Checked October 2026.
  5. Stripe documentation: Coupons and promotion codes · Promotion codes are customer-facing codes; many codes can reference one coupon. Checked October 2026.
  6. Stripe API: Create a Checkout Session · client_reference_id for reconciling a session with internal systems, maximum 200 characters. Checked October 2026.
Topicsaffiliate cookie duration30 60 90 day cookie windowreferral windowtime to signupB2B vs B2C affiliatecoupon attributionSafari cookie cap