Learn what cookie windows are, how they affect attribution, and best practices for choosing the right duration.
A cookie window (also called an attribution window) is the time period after a click during which a conversion can be credited to the affiliate. If a visitor clicks an affiliate link today and your cookie window is 30 days, any purchase made within the next 30 days is attributed to that affiliate.
The cookie window starts from the moment of the click, not from the visitor's first visit to your site. Each new click resets the window — so if the same visitor clicks a different affiliate link, the window resets and the new affiliate becomes the attributed partner (under last-click attribution).
Cookie windows are configured at the program level and apply to all affiliates in that program. The minimum window is 1 day and the maximum is 365 days. You can change the window at any time, but the change only affects future clicks — existing cookies retain their original expiration.
When the Icodrip Edge Function processes a click, it sets a first-party cookie on the visitor's browser. This cookie has an expiration date calculated by adding the cookie window duration to the current timestamp. For a 30-day window, the cookie expires exactly 30 days after the click.
When a conversion event arrives, Icodrip checks whether the associated click is still within the cookie window. If the click timestamp plus the window duration is in the past, the click has expired and the conversion is not attributed to any affiliate.
For server-side attribution (where a click ID is passed directly), the cookie window is still enforced. Even if you pass a valid click ID in your checkout metadata, Icodrip rejects the attribution if the click has expired. This prevents affiliates from earning commissions on very old clicks that likely did not influence the purchase.
The right cookie window depends on your product's typical sales cycle. For impulse purchases and low-cost products ($0-$50), a 7 to 14 day window is usually sufficient. Most conversions happen within the first few days of clicking an affiliate link.
For mid-range SaaS products ($50-$200/month), a 30 to 60 day window is standard. B2B buyers often need time to evaluate, run a trial, get internal approval, and complete the purchase. A window that is too short means affiliates lose credit for conversions they genuinely influenced.
For enterprise or high-ticket products ($500+/month), consider a 90 to 180 day window. Enterprise sales cycles can stretch over months with multiple stakeholders involved. A generous window ensures affiliates are fairly compensated for introducing these high-value leads.
Client-side cookie windows depend on the browser cookie persisting on the visitor's device. If the visitor clears their cookies, switches browsers, or uses a different device, the cookie is lost and attribution fails. Safari's Intelligent Tracking Prevention (ITP) also limits first-party cookie lifetimes to 7 days in some scenarios.
Server-side attribution is not affected by these browser limitations because it uses identifiers stored on your server (like customer email or a checkout session ID). The attribution window is enforced by Icodrip's server-side logic based on the click timestamp, not on a browser cookie.
For maximum attribution accuracy, we recommend using both methods simultaneously. Set your cookie window on the client side and also pass the click ID or referral code in your checkout flow for server-side backup. If the cookie is lost, server-side attribution still works.
Start with a 30-day cookie window and adjust based on your data. After running your program for a few weeks, analyze the time-to-conversion distribution in your dashboard. If most conversions happen within 7 days, you might not need a longer window. If conversions are still occurring at 25-28 days, consider extending to 60 days.
Be transparent with your affiliates about your cookie window. Display it prominently on your program signup page and in your affiliate terms. Affiliates use this information to decide which programs to promote — a longer window makes your program more attractive.
Avoid extremely long windows (180+ days) unless your sales cycle truly warrants it. Long windows can lead to attribution disputes and make it harder to accurately measure the impact of recent promotional efforts. They also increase the likelihood of a customer being attributed to an affiliate whose content they have long forgotten about.