Data Privacy & Protection Law · Mandatory where it applies

ePrivacy Directive: Cookie Consent and Electronic Marketing Rules

The ePrivacy Directive is the EU law behind cookie banners. Article 5(3) requires prior consent before storing or accessing information on a user's device, such as cookies, pixels, local storage and fingerprinting, unless strictly necessary for a service the user requested. It also restricts unsolicited electronic marketing and protects the confidentiality of communications, traffic and location data. It sits alongside the GDPR and is enforced through national laws, often by data protection authorities.

ePrivacy Directive compliance guide cover

The ePrivacy Directive, Directive 2002/58/EC, is the EU law that made cookie banners part of the web. Its Article 5(3) requires websites and apps to get users' consent before storing or reading information on their devices, unless that is strictly necessary for a service the user asked for. It also governs email and SMS marketing and the confidentiality of electronic communications. Because it is a directive, each EU country implements it through its own law, and enforcement is often by data protection authorities that also apply the GDPR.

A replacement ePrivacy Regulation was proposed in 2017 but withdrawn in 2025, and the Commission's November 2025 Digital Omnibus proposal would change how cookie rules work. Until any change is adopted, the directive and national laws apply. This guide explains the cookie rules, exemptions, consent quality, marketing rules, how they interact with the GDPR, and how to build a compliant setup.

What is the ePrivacy Directive?

The Directive on privacy and electronic communications was adopted in 2002 and amended in 2009 by Directive 2009/136/EC, which introduced the current consent requirement for cookies. It complements the GDPR as a specific law: where it sets rules, such as for device access, those rules apply, and the GDPR governs the processing of personal data that follows. National laws implement it, for example the TDDDG in Germany, the PECR in the UK (retained after Brexit), and articles of the French data protection law.

Who must comply?

  • Anyone storing or accessing information on a user's terminal equipment in the EU: websites, mobile apps, SaaS products, smart TVs and connected devices, whatever their location.
  • Senders of electronic direct marketing by email, SMS or automated calls.
  • Providers of publicly available electronic communications services, including, since the European Electronic Communications Code took effect in December 2020, many messaging and calling services, for the confidentiality, traffic and location data rules.

Article 5(3) applies whether or not the information is personal data. A cookie with no personal data still needs consent unless exempt.

Is it mandatory or voluntary?

Mandatory through national laws. There is no certification. Fines are set under national law or, where authorities apply the GDPR to the processing that follows, under GDPR limits.

Article 5(3): consent for cookies and similar technologies

Storing information, or gaining access to information already stored, in a user's terminal equipment is allowed only if the user has given consent after receiving clear and complete information, in line with the GDPR, about the purposes. Two exemptions apply:

  • Transmission exemption: storage or access for the sole purpose of carrying out the transmission of a communication over a network, such as load balancing.
  • Strictly necessary exemption: storage or access strictly necessary to provide an information society service explicitly requested by the user, such as session cookies, shopping basket cookies, authentication, security cookies, and user preference cookies such as language or consent choices.

Consent is required for analytics (with narrow national exceptions for configured first-party audience measurement in some countries, such as France), advertising, social media plugins that track, A/B testing tools that are not strictly necessary, session replay and most third-party scripts.

What counts as accessing a device?

The EDPB's Guidelines 2/2023, finalised in 2024, confirm that Article 5(3) is technology-neutral. It covers cookies, local storage, tracking pixels and tracking links, URL parameters that cause device information to be sent, device fingerprinting, IoT reporting, unique identifiers generated from device data and, in many cases, scripts that instruct the browser to send information to a third party. Moving tracking server-side does not avoid the rules if the device is still instructed to send information.

Consent uses the GDPR standard: freely given, specific, informed, unambiguous and given by a clear affirmative act. The Court of Justice ruled in Planet49 (C-673/17, 2019) that pre-ticked boxes are not valid consent, that the rule applies whether or not the data is personal, and that users must be told how long cookies last and whether third parties can access them. Authorities and courts have since established that:

  • Rejecting must be as easy as accepting, usually with a "reject all" button on the first layer.
  • No cookies requiring consent may be set before the user chooses.
  • Consent must be specific to purposes, with granular choices.
  • Withdrawal must be as easy as giving consent, usually through a persistent link or icon.
  • Cookie walls that block access unless users accept are generally not valid, though some authorities accept "pay or consent" models under strict conditions.
  • Dark patterns, such as colour tricks and confusing wording, invalidate consent.
  • Consent records should be kept as proof.

Mobile apps, SDKs and connected devices

The rules apply equally to apps. Reading the advertising identifier, device identifiers or installed app lists, and writing data to app storage for analytics or advertising, all need consent unless strictly necessary. Many analytics, crash reporting, attribution and advertising SDKs start collecting as soon as they are initialised, so the app must delay initialisation until the user chooses, or configure the SDK to start in a restricted mode. Crash reporting limited to what is needed to keep the app working may qualify as strictly necessary in some authorities' views, but analytics on user behaviour generally does not. Smart TVs, cars and other connected devices that report usage data back to the manufacturer fall under the same principle, which the EDPB's 2023 guidelines make explicit.

Electronic marketing (Article 13)

Unsolicited direct marketing by email, SMS and automated calling to individuals requires prior consent. The soft opt-in exception allows marketing similar products or services to existing customers whose contact details were obtained in the context of a sale, if they had a clear chance to object at collection and in every message. Senders must not disguise their identity and must provide a valid address to opt out. Marketing to business addresses is governed by national rules, which vary. Tracking pixels in marketing emails that report opens are also device access under Article 5(3) and may need consent.

Confidentiality, traffic and location data

For electronic communications services, the directive protects the confidentiality of communications and limits use of traffic data (such as call records) and location data to what is needed for transmission, billing or, with consent, value-added services. Providers must secure their services and notify personal data breaches to the national authority, under Regulation 611/2013 within 24 hours where feasible. Most SaaS products are not communications services, but messaging and calling features can bring parts of a product within scope.

How the ePrivacy Directive and GDPR work together

The ePrivacy Directive decides whether you can access the device. If consent is required under Article 5(3), the subsequent processing of personal data obtained must have a GDPR legal basis, and authorities expect that to be consent too, as legitimate interest cannot override a lack of ePrivacy consent. The GDPR's one-stop-shop mechanism does not apply to ePrivacy enforcement, so authorities in several countries can act against the same company. This is why French, Italian and other authorities have fined large technology companies tens or hundreds of millions of euros over cookie practices.

National implementation and enforcement

Because the directive is implemented nationally, details differ by country. Germany's rules sit in section 25 of the Telecommunications Digital Services Data Protection Act (TDDDG). France's CNIL published guidelines and a recommendation in 2020 requiring that refusing be as easy as accepting, and it allows certain first-party audience measurement without consent if strictly configured. Italy's Garante issued cookie guidelines in 2021, and Spain's AEPD updated its cookie guide in 2023 to align with EDPB positions. Ireland and the Netherlands have run sweeps of popular websites and issued warnings.

Enforcement has been heavy. In January 2022, the CNIL fined Google a total of EUR 150 million and Facebook EUR 60 million because refusing cookies was harder than accepting them, and it has fined many retailers, publishers and technology firms since. Authorities increasingly use automated tools to check whether trackers fire before consent, which makes technical gating more important than banner wording.

Reform: ePrivacy Regulation and the Digital Omnibus

The Commission proposed an ePrivacy Regulation in 2017 to replace the directive with a directly applicable regulation. After years of stalled negotiations, the Commission withdrew it in 2025. In November 2025, the Commission proposed a Digital Omnibus package that would, among other changes, move rules on device access for personal data into the GDPR, add exemptions for low-risk purposes such as some audience measurement and security, and require respect for automated browser-based consent signals. As of October 2026, the proposal was still being negotiated between the Council and Parliament, and its final content could differ substantially. Until adopted and in force, current national ePrivacy rules apply.

How to comply, step by step

  1. Scan your site or app for cookies, local storage, pixels, SDKs and fingerprinting, including tags loaded by tag managers.
  2. Classify each as strictly necessary or requiring consent, by purpose.
  3. Implement a consent management platform with accept all, reject all and granular choices on the first layer.
  4. Block non-essential tags until consent, using tag manager consent modes or server-side gating.
  5. Write a cookie notice listing purposes, providers, durations and third-party access.
  6. Store consent records and re-ask at reasonable intervals.
  7. Make withdrawal easy with a persistent settings link.
  8. Review email and SMS marketing for consent or soft opt-in, and opt-out handling.
  9. Check mobile SDKs: initialise analytics and ad SDKs only after consent.
  10. Retest after every release, since new scripts slip in.

Documentation you will need

  • Cookie and tracker inventory with purposes, providers and durations.
  • Consent records and banner versions.
  • Cookie notice and privacy notice.
  • Marketing consent and opt-out records.
  • Scan reports and release testing records.
  • Data processing agreements with analytics and ad vendors.

Timeline and cost considerations

Implementing a compliant consent setup for a typical website or store takes days to a few weeks, depending on how many tags are involved. Costs include a consent management platform subscription, engineering to gate tags and SDKs, and periodic scans. Server-side analytics or privacy-friendly analytics tools can reduce the number of tags needing consent but do not remove the rules by themselves.

Common mistakes

  • Banners that do not block anything, with tags firing before choice.
  • No reject button on the first layer.
  • Treating analytics as strictly necessary.
  • Forgetting mobile SDKs and email tracking pixels.
  • Assuming server-side tagging removes the need for consent.
  • Ignoring national differences in enforcement and exceptions.

Best practices, tools and technologies

  • Use a certified consent management platform compatible with your tag manager and ad stack.
  • Use tag manager consent states to gate tags and fire nothing optional by default.
  • Prefer first-party, minimal analytics configured for privacy.
  • Run automated cookie scans in CI or after deployments.
  • Respect Global Privacy Control for US users alongside EU consent; see US state privacy laws.
  • Keep performance in mind: load the consent tool without hurting Core Web Vitals.

We build consent-aware tag loading, privacy-friendly analytics and fast-loading consent banners through our web application development and e-commerce services.

How it relates to other laws

LawRelationship
GDPRGoverns processing after device access and sets the consent standard.
UK GDPR and PECRThe UK equivalent, with some exemptions for analytics added by the Data (Use and Access) Act 2025.
Digital Services ActBans dark patterns on platforms and restricts targeted ads using sensitive data or to minors.
CCPA/CPRAUS opt-out model for sale and sharing, versus EU opt-in for device access.

Real-world example

A Shopify-based store run by an Indian team sells to customers in Germany and France. A scan finds analytics, two ad pixels, a chat widget and a session replay tool. The team configures a consent platform with accept and reject buttons, sets the tag manager to deny all optional tags by default, loads the chat widget only when the user opens it, removes session replay, and confirms that a fresh browser visit sets only session and basket cookies before choice. Email marketing to past buyers uses soft opt-in with unsubscribe links, and new subscribers use double opt-in.

Next steps

  1. Scan your site and apps.
  2. Block optional trackers until consent.
  3. Add a first-layer reject option.
  4. Fix marketing consent and opt-outs.
  5. Track the Digital Omnibus.

Frequently asked questions

Generally yes, unless a national exemption for privacy-configured audience measurement applies.

No. Cookies strictly necessary for a service the user explicitly requested, such as login and basket cookies, are exempt.

No. Article 5(3) applies to any information stored on or read from the device.

No. The Court of Justice ruled in Planet49 that pre-ticked boxes are not valid consent.

Must there be a reject all button?

Many authorities require rejecting to be as easy as accepting, usually with a reject option on the first layer.

Not if the user's device is still instructed to send information; the EDPB guidelines take a broad view of device access.

Is the ePrivacy Regulation in force?

No. It was withdrawn in 2025.

What is the soft opt-in?

An exception allowing email marketing of similar products to existing customers who were given a chance to object.

Does the directive apply to companies outside the EU?

Yes, if they access the devices of users in the EU.

It proposes to, but it was still under negotiation in October 2026; current rules apply until any change takes effect.

National authorities, often data protection authorities, under their national implementing laws.

Official sources

  1. Directive 2002/58/EC on privacy and electronic communications (consolidated) (EUR-Lex)
  2. Guidelines 2/2023 on the technical scope of Article 5(3) of the ePrivacy Directive (European Data Protection Board)
  3. Case C-673/17 Planet49 (Court of Justice of the European Union)
  4. ePrivacy Regulation policy page (European Commission)
  5. Cookies and other tracking devices: CNIL guidelines (CNIL)

Review history

Last reviewed Oct 30, 2026. Next scheduled review Jan 30, 2027, or sooner if the Digital Omnibus is adopted or the EDPB issues new cookie or tracking guidance.

  • : First published.

This guide explains the official requirements in plain language. It is not legal advice and does not tell you whether your organisation is compliant. Confirm with qualified counsel, your auditor or an accredited certification body.

Written by · Developers and project managers

Researched from the official sources listed above and written by WorldWin Coder's engineering team, who build the access controls, audit logging, encryption and privacy features that these rules ask for.

Related compliance
Law EU, with reach beyond it

GDPR

General Data Protection Regulation, Regulation (EU) 2016/679

The GDPR is the European Union's data protection law. It sets the rules for processing personal data of people in the EU: lawful bases, transparency, data minimisation, security, individual rights, breach notification within 72 hours, and limits on transfers outside the EU. It applies to EU organisations and to companies elsewhere that offer goods or services to people in the EU or monitor them. Fines can reach 20 million euros or 4 percent of worldwide annual turnover.

Read the guide
Law United Kingdom

UK GDPR and Data Protection Act 2018

UK General Data Protection Regulation and the Data Protection Act 2018, as amended by the Data (Use and Access) Act 2025

The UK GDPR and the Data Protection Act 2018 form the UK's data protection law, kept from the EU GDPR after Brexit and amended by the Data (Use and Access) Act 2025. The core principles, lawful bases, rights and breach reporting match the EU GDPR, but the UK now has recognised legitimate interests, more flexible rules for automated decisions, changes to subject access and complaints, cookie exemptions and its own transfer rules. It applies to UK organisations and to companies abroad that target UK residents.

Read the guide
Law European Union

Digital Services Act

Regulation (EU) 2022/2065 on a Single Market for Digital Services (Digital Services Act, DSA)

The Digital Services Act sets EU-wide rules for online intermediaries, from internet access and hosting to social networks, marketplaces and app stores. It keeps liability exemptions for user content but adds tiered due diligence duties: points of contact and transparent terms for all, notice and action and statements of reasons for hosts, complaint handling, dark pattern bans, ad transparency and trader checks for platforms, and risk assessments and audits for very large platforms. Fines can reach 6 percent of global turnover.

Read the guide
Law California, US

CCPA / CPRA

California Consumer Privacy Act of 2018, as amended by the California Privacy Rights Act of 2020 (Cal. Civ. Code 1798.100 and following), and CPPA regulations

The CCPA, as amended by the CPRA, is California's general consumer privacy law. It gives California residents the right to know, delete and correct personal information, to opt out of its sale or sharing for cross-context behavioural advertising, and to limit the use of sensitive personal information. It applies to for-profit businesses meeting revenue or data volume thresholds, requires specific contracts with service providers, and is enforced by a dedicated agency with fines per violation and a private right of action for some data breaches.

Read the guide
Law US states

US state privacy laws

General consumer data privacy laws of US states, including Virginia, Colorado, Connecticut, Texas, Oregon and others

With no general federal privacy law, US states have passed their own consumer privacy laws. Starting with California and Virginia, around 20 states now have such laws in effect, most following a similar model: thresholds based on the number of state residents, rights to access, correct, delete and port data, opt-outs from targeted advertising, sale and profiling, consent for sensitive data, data protection assessments, processor contracts and enforcement by the attorney general.

Read the guide
Certifiable standard Global

ISO/IEC 27701

ISO/IEC 27701 Information security, cybersecurity and privacy protection: Privacy information management systems: Requirements and guidance

ISO/IEC 27701 is the international standard for a privacy information management system (PIMS): a managed way to protect personal data and meet privacy obligations as a controller, a processor or both. The 2025 edition made it a standalone, certifiable management system standard with its own clauses 4 to 10, no longer an extension that required ISO/IEC 27001. It includes control sets for controllers and processors and is widely used to structure compliance with laws such as the GDPR.

Read the guide
Compliance-ready software

Building software that has to pass an audit?

We build the parts auditors and privacy laws look for: role-based access, audit logs, encryption, consent records, data export and erasure, and secure development practices. Tell us about your product and get a free quote within one business day.

  • Free consultation and quote
  • NDA on request
  • You own the source code
  • Reply within one business day

Tell us about your product

Add budget and timeline optional, helps us quote faster

This form is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.