Cookie Duration
Cookie duration refers to how long a cookie remains stored on a user's browser or device after it is set, before it expires and is deleted. This period can range from a very short time to a much longer one, depending on how the cookie is configured. In affiliate marketing specifically, cookie duration often refers to the window during which an affiliate can be credited with a referral after a user clicks their link.
Cookie duration is the interval, defined at the time a cookie is created, during which the cookie persists on the user's device before automatic expiry and deletion. For persistent cookies, this is set through an explicit expiry date (Expires attribute) or a relative lifetime (Max-Age attribute); session cookies, by contrast, generally persist only until the browser session ends and carry no fixed expiry. Reported durations for persistent cookies can vary widely, from minutes to years. The term also has a domain-specific meaning in affiliate marketing, where it denotes the attribution window, commonly described as ranging from around 1 to 30 days, during which a referred visitor's action can be credited to the affiliate who set the cookie. Note that this evidence packet describes only the technical and commercial meaning of cookie duration; it does not address the consent, disclosure, or storage-limitation obligations that may apply to cookie lifetimes under the ePrivacy Directive, the GDPR, or other regimes, and practitioners should assess those requirements separately, as guidance on acceptable cookie lifespans varies by jurisdiction.
Why it matters
Cookie duration determines how long tracking, preferences, or attribution data persist on a user's device, which has direct consequences for both user privacy and business operations. A cookie configured to last minutes behaves very differently from one set to persist for months or years, and the choice of lifetime shapes how long a website can recognise a returning visitor or retain information about them. Because longer-lived cookies extend the period during which data associated with a device remains accessible, duration is often scrutinised in privacy assessments, even though this evidence digest addresses only the technical and commercial meaning of the term.
In the EU and UK, the storage-limitation principle under the GDPR and the disclosure and consent requirements under the ePrivacy Directive and its national implementations may bear on how long cookies should be permitted to last, but guidance on acceptable cookie lifespans varies by jurisdiction and this definition does not resolve those questions. Practitioners should treat cookie duration as a configuration decision that intersects with, but is not governed by, this technical description alone, and should assess consent, disclosure, and retention obligations separately for each applicable regime.
In affiliate marketing, cookie duration carries a distinct commercial significance: it defines the attribution window during which an affiliate can be credited with a referred visitor's action after a click. A shorter window narrows the period in which a sale can be attributed to the referring affiliate, while a longer window extends it, so duration directly affects how commissions are earned and allocated.
Who it's relevant to
Inside Cookie Duration
Common questions
Answers to the questions practitioners most commonly ask about Cookie Duration.