Last updated: 23 June 2026
Cookie Duration Sets the Clock on Your Commission Window
Affiliate program cookie duration is the length of time a tracking cookie stays active in a visitor's browser after they click your affiliate link. If the visitor completes a purchase before that window closes, you earn the commission. If they return after it expires, you get nothing, even if your link drove the original visit. The clock starts at the click, not the sale.
When someone clicks your link, the merchant's platform writes a small text file to the visitor's browser containing your affiliate ID, a timestamp, and sometimes the specific product or landing page. Every time the visitor returns to the merchant's site within the window, the browser sends that cookie back, and the tracking system checks whether a qualifying conversion has occurred.
Most affiliate programs set cookie durations between 7 and 90 days, with 30 days as the industry standard. Some programs run shorter windows as tight as 24 hours, common in fast-moving retail. Others run lifetime cookies tied to a customer account rather than a browser session.
One important caveat: cookies can be cleared, blocked by browser privacy settings, or overwritten by a competing affiliate's click. A 30-day window on paper can be considerably shorter in practice.
How resets work varies by program. Some reset the clock on each new click from the same affiliate, extending the window. Others use a last-click model, meaning a different affiliate's link clicked later can overwrite yours entirely before the original window expires.
When a Cookie Fires and What Triggers a Valid Commission
A tracking cookie is written to a visitor's browser the moment they click an affiliate link. If the same visitor completes a purchase on the same device, in the same browser, before that timer expires, you earn a commission. All three conditions must hold simultaneously. Miss any one and the sale typically goes unattributed.
The Moment of Write
When a user clicks your link, the merchant's tracking script drops a small file in the browser's cookie storage containing your affiliate ID and a timestamp. The network reads both at checkout to confirm the click falls inside the active window.
Digitalapplied's 2026 affiliate marketing data shows 38% of programs now run windows of 7 days or less, a direct consequence of Apple's ITP 2.3 and the ATT framework compressing how long first-party cookies survive in Safari.
What Has to Be True at Checkout
Three conditions must align for a commission to pay out:
- The purchase happens on the same device where the click occurred
- The same browser is used (switching from Chrome to Safari breaks the chain)
- The transaction completes before the cookie expires
SaaS programs illustrate the timing problem well. Trackdesk's analysis notes that leads often take 30 to 90 days to convert, meaning a 7-day window eliminates most commissions before the prospect reaches a decision.
Where It Breaks Down
The cookie can fire correctly and still produce no payout. Common failure points include the visitor clearing their browser cache, using a private or incognito window for checkout, or switching devices between click and purchase.
Coupon-stacking is another issue. If a user clicks your link but later uses a coupon code tied to a different affiliate, many networks award credit to the coupon source and zero out your cookie entirely.
Last-click attribution protects merchants from duplicate commissions but consistently undercounts affiliate contribution on longer purchase journeys. If you promote high-consideration products, you carry the most exposure here.
Cookie Duration in Practice: A Step-by-Step Walkthrough
Step 1: The Click and the Cookie
A visitor lands on a product page through your affiliate link. The network sets a cookie in their browser tied to your affiliate ID. For a program running a 30-day window, that cookie is valid until midnight on day 30. Affiliatly's help documentation describes cookie duration as the window that "defines how long an affiliate can earn a commission after referring a visitor."
The visitor does not buy immediately and closes the tab.
Step 2: The Return Visit on Day 12
Twelve days later, the same visitor returns directly to the merchant's site. Because the 30-day cookie is still active, the network reads the stored affiliate ID the moment the session begins. No new click is required. The attribution is already in place.
This scenario only holds if the visitor uses the same browser and device. A returning buyer who switches from desktop to mobile or clears cookies breaks the chain entirely, and the commission is lost regardless of remaining days on the window.
Step 3: Conversion Logging and Commission Calculation
When the visitor completes the purchase, the merchant's checkout page fires a conversion pixel back to the affiliate network. The network matches the order to the stored cookie, confirms it has not expired, and records the conversion against your account.
Commission is then calculated on the qualifying order value. Most programs apply a flat percentage to the subtotal before tax and shipping. Trackdesk's breakdown notes that duration is one of the primary variables merchants adjust when balancing affiliate incentive against attribution cost. Windows range from 24 hours to 90 days or longer depending on the average sales cycle.
Common Mix-Ups: Cookie Duration vs. Attribution Models vs. Tracking Methods
Cookie duration, attribution models, and tracking methods are three separate mechanisms that work together but mean different things. Cookie duration sets the time window in which a conversion can be credited. Attribution models decide which click in that window gets the credit. Tracking methods determine whether the click gets recorded at all.
Say a shopper clicks an affiliate blog post on day one, then clicks a coupon site on day seven. Both clicks fall inside a 30-day cookie window. A last-click model hands the commission to the coupon site. A first-click model gives it to the blog. Marketing attribution models determine how credit gets distributed across every touchpoint in the buyer's journey, so the same cookie duration can produce completely different payout outcomes depending on which model the program runs.
Tracking method adds a third layer. Standard browser cookies fail when users switch devices, clear their cache, or browse in private mode. Server-side tracking and probabilistic fingerprinting exist to fill that gap, matching conversions to clicks without relying on a stored cookie. The trade-off: fingerprinting raises privacy compliance questions under GDPR, so not every merchant can use it.
Frequently Asked Questions
What is a good cookie duration for an affiliate program?
30 days is the most common standard across mid-market programs. If you are promoting B2B SaaS or high-ticket products with longer research cycles, look for programs offering 60 or 90 days. Amazon Associates uses 24 hours, which is unusually short and frequently cited as a disadvantage for affiliates promoting products requiring comparison shopping.
Does clearing cookies affect affiliate tracking?
Yes. If a visitor clears browser cookies before purchasing, you get no credit even if the click happened well within the cookie window. This is a known gap in cookie-based tracking, and one reason some networks layer in server-side or fingerprint tracking to recover lost attributions.
What happens if a customer clicks two different affiliate links?
Under last-click attribution, the most common model, the second affiliate's cookie overwrites the first and that affiliate earns the commission. Some programs use first-click or linear attribution instead, which changes who gets paid. Check the program terms before promoting.
Can affiliate cookie duration be different for different products in the same program?
Yes. Some merchants set different durations by product category or commission tier, though this is less common than a single program-wide window. Read the program terms carefully before promoting, because a shorter window on a high-consideration product can significantly reduce your effective earnings.
How does cookie duration affect affiliate earnings in practice?
A longer window gives you credit for delayed purchases, which matters most in categories where buyers research for weeks before committing. A 7-day cookie on a product with a 3-week research cycle means many conversions go unattributed even though your content drove the original visit. Matching your promotional strategy to programs whose cookie windows align with the product's typical sales cycle is one of the more direct ways to protect your commission rate.
Before you join any program, compare cookie duration, attribution model, and network details side by side. Visit AffiliateLandscape to see how programs stack up across all three variables in one place.
AffiliateLandscape Weekly
Enjoyed this? Get the weekly briefing.
Once a week: new affiliate programmes, industry news, upcoming events and hiring moves, curated for people working in performance marketing.
Ready to explore the affiliate landscape?
Discover networks, tools, and opportunities in our directory.
Explore Directory