Cookie Law Compliance: What Every Website Owner Needs to Know

Website cookies concept

Few things frustrate website visitors more than a clunky cookie consent banner that blocks half the page. But those banners exist for a reason โ€” and the legal reason is significant. Cookie consent laws, primarily the EU ePrivacy Directive and its interaction with GDPR, have created compliance obligations that extend far beyond Europe's borders. Any business with a website that serves European visitors needs to take these obligations seriously.

What Are Cookies and Why Do They Matter?

Cookies are small text files that websites store on a visitor's browser. They were invented in 1994 by Netscape engineer Lou Montulli to solve an early problem with web commerce โ€” how to remember that a shopping cart belonged to a specific visitor without requiring them to log in for every page view. That basic concept has evolved into a complex ecosystem of tracking, advertising, analytics, and personalization that powers much of the modern internet.

Cookies persist beyond a single browser session. A cookie set today might still be on a visitor's browser a year from now, depending on its expiration. First-party cookies are set by the website you're visiting. Third-party cookies are set by embedded elements โ€” an advertising network, a social media plugin, an analytics provider โ€” and can track you across multiple sites. This distinction matters enormously for privacy law.

The EU ePrivacy Directive

The ePrivacy Directive, originally the Cookie Directive, was adopted in 2002 and revised in 2009. It requires that websites obtain informed consent before storing cookies or accessing information on a user's device. The logic was simple: cookies can be used to track people, and tracking people without their knowledge or consent is wrong.

The ePrivacy Directive applies to any website that targets EU users, regardless of where the business is located. A US company selling products to European customers needs to comply. The penalties for non-compliance vary by country โ€” France's CNIL has issued fines exceeding โ‚ฌ60 million to companies that failed to obtain proper consent for advertising cookies.

GDPR and Cookie Consent

When GDPR took effect in 2018, it significantly strengthened cookie consent requirements. GDPR defines consent as "freely given, specific, informed and unambiguous indication of the user's wishes." Under this standard, cookie banners must give users a genuine choice. Pre-ticked boxes, "accept all" defaults disguised as the only option, and consent walls that block access without cookie acceptance all fail GDPR requirements.

The concept of legitimate interest, which can serve as an alternative legal basis under GDPR for some data processing, is generally not available for cookies. Advertising networks and analytics platforms typically require consent because their tracking isn't strictly necessary for the website to function.

Types of Cookies and What Requires Consent

The ePrivacy Directive carves out an exception for cookies that are "strictly necessary" for a service explicitly requested by the user. Authentication cookies that keep you logged in are a good example โ€” without them, the login service wouldn't work. Analytics cookies are generally not considered strictly necessary, because you can run an analytics-free website. Functional cookies that remember user preferences might qualify, depending on how they're implemented.

Beyond strictly necessary cookies, everything else requires consent. This includes analytics cookies (even first-party ones like Google Analytics), advertising and marketing cookies, social media tracking pixels, and any form of cross-site tracking. Each category should be presented as a separate choice, not bundled together.

Implementing Cookie Compliance

A compliant cookie consent implementation has several components. First, a consent management platform (CMP) that presents clear information about what cookies are used and gives users genuine granular control. Second, a mechanism to record and remember consent, including what was consented to and when. Third, the technical ability to honor a user's preferences โ€” if someone declines analytics cookies, your analytics code shouldn't run. Fourth, a mechanism to allow users to change their preferences later.

The consent banner should appear before any non-essential cookies are set. Using a tag management system that fires tags only after consent is obtained is the most reliable technical approach. Many CMPs integrate directly with popular tag managers.

The Cookie Policy

Beyond the consent banner, you need a cookie policy that's actually readable. EU regulators have taken action against cookie policies that are buried in privacy policies, written in incomprehensible legalese, or simply list "cookies" without explaining what each one does. A good cookie policy names each cookie, explains its purpose, identifies the party setting it (first-party or third-party), and describes how long it persists.

The relationship between your cookie policy and your privacy policy matters. Your privacy policy should reference your cookie practices and link to your cookie policy. The cookie policy should be easily accessible from every page on your site, typically through a link in the footer.

Cookie compliance isn't a one-time project. When you add new services, change analytics providers, or launch new marketing campaigns that involve tracking, you need to update your consent mechanisms and cookie policy. Regular reviews โ€” at least annually, and whenever you make significant changes to your website โ€” are essential.

Key Requirements

  • Obtain consent before setting non-essential cookies
  • Give users granular, meaningful choices โ€” not just "Accept All"
  • Record consent with timestamp, what was consented to, and version of consent text
  • Honor preferences by only setting cookies the user has accepted
  • Maintain a detailed cookie policy that's easily accessible