A visitor clicks your affiliate’s link on a Monday, browses your product page for a few minutes, and leaves without buying. On Thursday, they come back directly, add the product to their cart, and complete the purchase. Does the affiliate get credit for that sale?
The answer depends entirely on your cookie duration. If your cookie window is 7 days or longer, yes, the affiliate gets the commission. If it is 24 hours, they do not. That three-day gap between click and purchase just cost your affiliate their payout, and they will eventually notice that your program converts worse than competitors who offer longer windows.
Cookie duration is one of those settings that feels like a minor technical detail when you first set up your program. It is not. It directly affects how much affiliates earn, how attractive your program is to potential partners, and how accurately your tracking reflects the real customer journey. Getting it wrong means either underpaying affiliates (window too short) or overpaying for sales that would have happened anyway (window too long, though this is rarer and less damaging than most people assume).
How cookie tracking works in affiliate programs
When a visitor clicks an affiliate link, a small file (the cookie) is placed on their browser. That cookie contains an identifier tying the visitor to the affiliate who sent them. If the visitor makes a purchase before the cookie expires, the sale is attributed to that affiliate. If the cookie expires before the purchase happens, the attribution is lost and the sale registers as a direct or organic visit instead.
The “duration” or “window” is how long that cookie stays active. A 30-day cookie means the affiliate gets credit for any purchase made within 30 days of the click. A 90-day cookie extends that to three months. A session-only cookie expires the moment the visitor closes their browser, which effectively means the purchase has to happen during that same visit or the affiliate gets nothing.
For a full technical walkthrough of how affiliate tracking works beyond just cookies (including server-side tracking and coupon code attribution), our guide on tracking affiliate sales covers the complete picture.
What duration should you set?
There is no universal right answer, but there are clear guidelines based on what you sell and how long your customers typically take to decide.
24 Hours
Only makes sense for impulse purchases under $20 where the buying decision takes minutes, not days. Amazon Associates uses a 24-hour window, but Amazon can afford to because their brand recognition and checkout speed mean most purchases happen within that same session. Unless you have Amazon-level conversion rates, 24 hours penalizes your affiliates unfairly.
30 Days
The most common default and a reasonable starting point for most e-commerce products in the $30 to $200 range. Covers the typical browse-research-return-buy cycle for mid-price items. Most customers who are going to buy after clicking an affiliate link will do so within 30 days. This is where the majority of affiliate programs land, and it is a safe default if you are unsure.
60 to 90 Days
The right choice for higher-priced products ($200+), SaaS subscriptions, and B2B purchases where the decision cycle is longer. A business evaluating project management software might take six weeks between the first click and signing up for a paid plan. A 30-day cookie would miss that conversion entirely. If your sales cycle is measured in weeks rather than hours, extend the window accordingly.
If you are uncertain, look at your own analytics. Check how many days pass between a visitor’s first site visit and their purchase. If your median time-to-purchase is 8 days, a 30-day cookie gives you comfortable coverage. If it is 25 days, you are cutting it close and should consider 60 or 90. The data in your analytics platform tells you the answer more accurately than any industry benchmark.
In GA4, you can check this by looking at the “Days to conversion” path in your conversion reports. Filter for affiliate traffic (if you use UTM tagging) and look at the distribution. If 85% of conversions happen within 14 days and only 3% happen after day 30, a 30-day window covers you well. If 20% of conversions are happening between day 15 and day 45, you are leaving significant revenue unattributed with a 30-day window.
You can also change your cookie duration after launch. If you start at 30 days and later discover that your data supports a longer window, extend it to 60 or 90. This is a positive change you can announce to affiliates: “We have extended our cookie window from 30 to 90 days.” It is a retention and recruitment message in one sentence. Going the other direction (shortening a window) is much harder because it feels like a takeaway to existing partners. Start generous and adjust from data rather than starting tight and trying to expand later.
First-party cookies vs third-party cookies
This distinction matters more now than it ever has. Browsers have been restricting third-party cookies for years, and the trend is only accelerating. If your affiliate tracking relies on third-party cookies, you are losing conversions right now and the problem gets worse every month.
Third-party cookies
Set by a domain other than your website (typically the affiliate platform’s domain). These are the cookies that Safari, Firefox, and Brave already block by default, and Chrome has been restricting progressively. If your tracking platform sets a cookie on “trackingplatform.com” when a visitor arrives at “yoursite.com,” that is a third-party cookie and it will not persist on a growing number of browsers. The result: lost attributions, unpaid affiliates, and inaccurate data.
First-party cookies
Set by your own domain. When the affiliate link redirects through your site and the cookie is set on “yoursite.com,” browsers treat it as first-party, which means it is not blocked by privacy settings. First-party cookies persist reliably across sessions and are the standard that every modern affiliate platform should support. If your current tracking tool does not offer first-party cookie support, that alone is reason enough to switch.
In practice: make sure your affiliate platform uses first-party cookies. Most modern tools (Tapfiliate, Trackdesk, Post Affiliate Pro, and the major networks) support this, but it is not always the default configuration. Check your settings. Run a test purchase using Safari with strict privacy settings enabled. If the conversion does not track, your cookies are being blocked and you need to update your integration.
Cookie duration as a recruitment tool
Affiliates compare programs before deciding where to invest their promotional effort. Commission rate gets the most attention, but experienced affiliates know that cookie duration affects their earnings just as much. A program paying 15% with a 24-hour cookie can be less profitable than one paying 10% with a 90-day cookie, because the longer window captures sales that the short window misses entirely.
When you list your cookie duration on your affiliate signup page (and you should, prominently), it functions as a selling point. “90-day cookie” immediately signals to affiliates that you understand how content-driven promotions work. Blog posts and YouTube videos drive traffic over weeks and months. A reader who clicks a review link today and buys 18 days later is a sale the affiliate earned. A 90-day window makes sure they get paid for it.
If you are setting affiliate commission rates and feel pressure to offer a higher percentage than you can afford, consider extending your cookie window instead. A 30-day to 90-day upgrade costs you nothing in additional commissions per sale. It just means more sales get attributed to affiliates who actually drove them. That increased attribution makes your program’s EPC (earnings per click) higher, which makes it more attractive to the affiliates you want to recruit.
Check what your competitors offer. If every other program in your space runs a 30-day cookie and you offer 90, that is a concrete differentiator you can mention in every recruitment pitch. Affiliates who have been burned by short windows at other programs will notice. It signals that you respect the work they put into content that takes time to convert.
What happens when cookies fail
Even with first-party cookies and a generous window, some conversions will not track. The visitor clears their cookies. They switch from their phone to their laptop. They use a browser with aggressive privacy settings. They click the affiliate link in one browser and buy in another. In all of these cases, the cookie is gone and the affiliate does not get credit.
Cross-device behavior is the biggest gap. A growing percentage of shopping journeys start on mobile and finish on desktop. If the cookie was set on the phone browser and the purchase happens on a laptop, there is no way for a cookie-based system to connect the two visits. Some platforms attempt fingerprinting or probabilistic matching to bridge this gap, but the accuracy varies and privacy regulations are making these approaches harder to implement. Accept that some percentage of affiliate-driven sales will go unattributed. The question is whether that percentage is 5% (manageable) or 25% (a problem that needs backup tracking methods).
This is why relying on cookies alone is risky. The best affiliate tracking setups use cookies as the primary method and supplement with at least one backup: server-side (postback) tracking that records the conversion on your server regardless of the visitor’s browser settings, or coupon code tracking that attributes the sale based on a unique discount code rather than a cookie. Both methods are immune to the browser privacy changes that make pure cookie tracking less reliable every year.
You should also have a policy for manual attribution. When an affiliate contacts you and says “I sent this customer, they bought, but my dashboard does not show the sale,” you need a process for verifying and crediting the conversion. Most good programs handle this on a case-by-case basis: the affiliate provides evidence (a screenshot, a referral trail, or a timestamp that matches a click in the system), and you manually add the commission. Documenting this policy in your affiliate program terms sets expectations up front and avoids disputes later.
Cookie overwriting: last click vs first click
One more decision you need to make: what happens when a visitor clicks links from two different affiliates before buying? If Affiliate A sends the visitor on Monday and Affiliate B sends the same visitor on Wednesday, and the purchase happens Friday, who gets the commission?
Most programs use last-click attribution, meaning the most recent affiliate cookie overwrites the previous one. Affiliate B gets the sale. This is the default on nearly every tracking platform and is the simplest model to explain to partners. The downside is that it can undervalue the affiliate who introduced the customer in the first place.
First-click attribution does the opposite: the first affiliate’s cookie is locked in and cannot be overwritten. This rewards discovery over closing and makes sense for programs that rely heavily on content creators who introduce new audiences to the brand. It is less common but growing in popularity, especially among SaaS programs where the initial discovery is the hardest part of the funnel.
Whichever model you choose, document it clearly and tell your affiliates before they start promoting. Attribution disputes are one of the fastest ways to lose a partner’s trust, and almost all of them come from mismatched expectations rather than actual tracking errors. State your attribution model in your program terms, mention it during onboarding, and be ready to explain it when asked.
A generous cookie window costs you nothing extra per sale. It just ensures that the affiliates who genuinely drive purchases get paid for them. When in doubt, go longer.
How To Start Affiliate Marketing Program
The Complete Launch Framework
eBook by Unseen Founder
How to Start an Affiliate Marketing Program is a structured, no-fluff framework for companies that want to design, validate, and launch a profitable affiliate program from scratch. It is not a collection of tips.
It is a complete operational blueprint built for founders, marketing leaders, and affiliate managers to launch a profitable affiliate program from zero.
