Affiliate cookie duration is the time window after a click in which a sale still counts for the affiliate. It sounds like a small setting, but it shapes how fair your program feels, how much you pay, and how much fraud you invite. This guide explains how affiliate cookie duration works, what typical lengths look like, and how to pick one for your Shopify store, including stores that sell on cash on delivery (COD).
What is affiliate cookie duration?
When a shopper clicks an affiliate link, the store saves a small piece of data in their browser. This is the referral cookie. It records which affiliate sent the visitor.
If the shopper buys while that cookie is still valid, the affiliate gets credit for the order. If the cookie has expired, the sale counts as a normal store sale and no commission is due.
The length of that window is called the cookie duration, cookie life, or cookie window. Common names you will see in affiliate apps and program terms:
- Cookie duration
- Cookie lifetime
- Referral window
- Attribution window
- Return days
They all describe the same idea: how many days a click stays "active" for an affiliate.
Why cookie duration matters
Cookie duration affects three groups at once: your affiliates, your customers and your margins.
For affiliates
Affiliates want credit for the buyers they bring. Many shoppers do not buy on the first visit. They compare prices, wait for payday, or ask a family member first. A short window can cut affiliates out of sales they clearly helped create. That makes your program less attractive to serious partners.
For your store
A longer window means you pay commission on more orders. Some of those orders might have happened anyway. A very long window can also reward an affiliate for a click that had little to do with the final purchase.
For fraud risk
Long windows make some types of fraud more profitable. For example, cookie stuffing is when someone drops referral cookies on many browsers without a real recommendation, hoping to collect commission on future sales. The longer the cookie lasts, the more future orders a stuffed cookie can claim. If you want to go deeper, see our guide to affiliate fraud, self-referrals and fake orders.
Typical affiliate cookie durations
There is no single correct number. Across affiliate programs and affiliate software guides, these are common choices. Treat them as typical starting points, not rules.
| Cookie duration | When it is common | Pros | Cons |
|---|---|---|---|
| 1 to 7 days | Impulse buys, flash sales, low-price products | Low risk of paying for sales you would get anyway | Affiliates may miss credit for slower buyers |
| 30 days | The most common default for online stores | Fair to most affiliates, easy to explain | May not cover long buying decisions |
| 60 to 90 days | Higher-price items, considered purchases | Attractive to content creators and bloggers | More commission on sales that may have happened anyway |
| 90+ days or lifetime | Subscriptions, software, niche programs | Strong recruiting pitch | Higher cost and higher fraud exposure |
Thirty days is a common default because it covers most retail buying cycles. Shopify's own affiliate program, for example, has used a 30-day cookie. Check the current terms of any program you use as a benchmark, because terms change.
How to choose the right cookie duration for your store
Instead of copying a competitor, base your window on how your customers actually buy.
1. Look at your time to purchase
Ask a simple question: how long do customers usually take between first visit and order?
- If most orders come the same day or within a few days, a short window (7 to 14 days) may be enough.
- If buyers often return a week or two later, 30 days is a safe middle ground.
- If you sell expensive items that people research, consider 60 days or more.
Some affiliate guides suggest choosing a window that covers most of your typical buying cycle, not just the fastest buyers. That keeps the program fair without paying for every late order.
2. Consider your price point
Price is a good proxy for decision time. A $15 phone case is usually an impulse buy. A $400 appliance is not. The higher the price, the more likely a buyer is to leave and come back.
3. Think about your affiliate types
Different partners drive traffic in different ways:
- Social creators (TikTok, Instagram, WhatsApp groups) often drive fast, impulse traffic. A shorter window can work.
- Bloggers and review sites drive research traffic. Buyers may read today and buy next week. They usually prefer longer windows.
- Coupon and deal sites catch buyers who were about to purchase anyway. A short window plus clear rules is common here.
If you recruit mostly one type, set your window for them.
4. Match your commission rate
Cookie duration and commission rate work together. A generous rate with a long window costs more. A modest rate with a long window can still be attractive. If you are still setting rates, read our guide on affiliate commission rates.
5. Write it in your program terms
Whatever you choose, state it clearly in your affiliate terms. Affiliates should know the window before they start promoting. Our affiliate program terms and conditions template includes a section for this.
Cookie duration is not the whole story: attribution rules
Cookie duration answers "how long does a click count?" But you also need to answer "which affiliate wins?" when more than one is involved. This is your attribution model.
Last click vs first click
- Last click: the most recent affiliate click before the order gets the credit. This is the most common model in affiliate marketing.
- First click: the first affiliate to send the shopper keeps the credit for the whole window.
Last click rewards the affiliate who closed the sale. First click rewards discovery. Most stores use last click because it is simple to explain and easy to verify.
Coupon codes vs cookies
Affiliate coupon codes do not depend on cookies at all. If a buyer types an affiliate's code at checkout, you know who referred them, even on a different device, weeks later. This is why many stores give each affiliate both a link and a code. For a full comparison, see affiliate coupon codes vs affiliate links.
Decide in advance which wins when a buyer uses one affiliate's code after clicking another affiliate's link. Many programs let the coupon win, because the buyer took a clear, deliberate action.
The limits of cookies in 2026
Cookies are useful, but they are not perfect. Keep these limits in mind when you set expectations with affiliates.
Browser privacy features
Modern browsers restrict tracking. Safari's Intelligent Tracking Prevention (ITP), for example, can shorten the life of some cookies, in some cases to 7 days or less, depending on how the cookie is set. That means a 30-day or 90-day setting may not hold on every device. The setting is the maximum, not a guarantee.
Cleared cookies and private browsing
Shoppers can clear cookies or browse in private mode. When that happens, the referral data disappears, no matter how long the window is.
Cross-device journeys
A shopper may click a link on their phone and order later from a laptop. The cookie lives on the phone, so the order on the laptop will not carry it. Coupon codes help close this gap.
Because of these limits, a longer cookie setting does not always mean many more tracked sales. Do not use a very long window as your main way to attract affiliates. Fair rates, fast payouts and good creative usually matter more.
Cookie duration for cash on delivery stores
COD stores have a few extra details to consider.
The click-to-order gap is often short
In many COD markets, buyers order through a quick form on the product page and pay at the door. The order step is fast. The long part comes later: confirmation calls, shipping and delivery. So the buying window itself is often short, and a 30-day window usually covers it with room to spare.
The cookie must survive the COD form
Many COD stores use form apps that create the order without the standard Shopify checkout. If your affiliate tracking only reads data at checkout, it can miss these orders, even when the cookie is still valid. Make sure your tracking passes referral data through to the order. Our guide on how to track affiliate sales on Shopify explains the main methods.
Credit is not the same as payment
In COD, an order placed is not money earned. Customers may refuse the parcel, cancel, or return it. So cookie duration decides who gets credit for an order, but it should not decide when you pay. Keep commissions pending until the order is delivered and paid, then wait a short hold period for returns. Read more in COD affiliate marketing: pay commission only on delivered orders.
A simple setup checklist
Use this list when you launch or review your program:
- Pick a window that covers most of your buyers' decision time (30 days is a common starting point).
- Decide your attribution rule: last click or first click.
- Decide what wins between a coupon code and a link click.
- Give each affiliate a tracked link and, if you can, a personal coupon code.
- Make sure orders from COD form apps keep the referral data.
- Hold commissions until delivery and payment, then a short return period.
- Flag self-referrals and suspicious repeat orders.
- Put the window and rules in your affiliate terms.
- Review results after a few months and adjust if needed.
Common mistakes to avoid
- Copying the longest window you can find. A 365-day cookie looks generous but adds cost and fraud risk, and browsers may cut it short anyway.
- Setting a window too short to be fair. A 24-hour window can push good affiliates away, especially bloggers.
- Changing the window without notice. Tell affiliates before you change it, and apply changes to new clicks only.
- Relying on cookies alone. Combine links with coupon codes to catch cross-device and cleared-cookie orders.
- Paying on order date, not delivery. In COD, this leads to paying for orders that never got delivered.
How Taguu helps
Taguu is a Shopify affiliate app built for COD stores. It gives each affiliate links for any product (with UTM and a ref code) and an optional coupon code you create. Attribution checks the affiliate coupon first, then UTM last click, then a referral cookie saved on the cart, so it works with COD form apps. The last affiliate click wins. Commissions stay pending until the order is delivered (and paid for COD) plus a hold period (7 days by default), and cancelled, refused, returned and refunded orders are reversed automatically. Self-referrals are flagged and get no commission. There is a Free plan for up to 50 affiliate orders a month and 0% fee on sales on every plan. You can install Taguu and start with a free plan.
FAQ
What is a good affiliate cookie duration?
Thirty days is a common starting point for online stores. Use a shorter window for impulse products and a longer one (60 to 90 days) for expensive items that buyers research before ordering.
Does a longer cookie duration mean more sales?
Not always. It means more orders can be credited to affiliates. It does not create new demand, and browser privacy features may delete cookies before the window ends.
What happens if a customer clicks two affiliate links?
It depends on your attribution model. With last click, the most recent affiliate gets the credit. With first click, the first affiliate keeps it. State your rule in your affiliate terms.
Do affiliate coupon codes need cookies?
No. A coupon code identifies the affiliate directly at checkout, so it works across devices and after cookies are cleared. That is why many stores give affiliates both a link and a code.
Should COD stores pay commission when the cookie converts?
The cookie decides who gets credit for the order. Payment should wait until the order is delivered and paid, plus a short hold for returns. This protects you from refused and cancelled COD orders.
