WordPress Cookie Notification: Complete Setup Guide
Learn how a WordPress cookie notification works, what the law requires, which plugins to use, and how to configure consent correctly for GDPR and CCPA.
Adding a WordPress cookie notification looks like a five minute job: install a plugin, pick a color, publish. The problem is that most of those plugins display a banner without stopping a single cookie, which leaves your site exactly as non-compliant as it was before, only now with proof that you knew about the obligation. This guide covers how cookie notifications actually work on WordPress, what the ePrivacy Directive and GDPR require, and how to configure consent so it holds up. It is educational content rather than legal advice, so consult a qualified attorney for guidance on your specific situation.
What a WordPress Cookie Notification Is
A WordPress cookie notification is an on-site interface that discloses the cookies and similar technologies your website uses, obtains the visitor's consent before non-essential cookies are set, and records that decision. It has three parts that must work together: the visible banner, the script blocking layer that enforces the choice, and the consent log that proves what happened.
Most site owners only think about the first part. The banner is the surface, but the enforcement layer is where compliance is won or lost. A banner that appears while Google Analytics has already written _ga to the browser is a notice, not consent.
WordPress core does not provide any of this. Since version 4.9.6 WordPress includes a privacy policy page generator, personal data export and erasure tools, and a comment cookie opt-in checkbox. None of those constitute a cookie notification, and none of them block third party scripts.
Why Your WordPress Site Needs One
WordPress sites accumulate cookies faster than most owners realize. A typical business site running a page builder, a contact form, an analytics stack, and a couple of embeds will set 15 to 40 cookies before the visitor clicks anything.
Common sources of non-essential cookies on WordPress:
- Google Analytics 4 and Google Tag Manager, which set
_gaand_ga_<container>on page load - Meta Pixel, which sets
_fbpand readsfbclidfrom ad clicks - Embedded YouTube videos, which set cookies from
youtube.comunless you use the privacy enhancedyoutube-nocookie.comdomain - Font and asset CDNs that transmit IP addresses to third countries
- Marketing plugins for popups, live chat, heatmaps, and A/B testing
- WooCommerce marketing extensions, distinct from the strictly necessary cart and session cookies
The legal trigger is Article 5(3) of the ePrivacy Directive (2002/58/EC as amended by 2009/136/EC), which requires informed consent before storing or accessing information on a user's terminal equipment. It applies to any storage technology, not only cookies, so local storage, session storage, and browser fingerprinting fall under the same rule. GDPR Article 4(11) then defines consent as a freely given, specific, informed, and unambiguous indication of the user's wishes given by a clear affirmative action.
Penalties for cookie violations vary by member state because ePrivacy is enforced through national law. France's CNIL has been the most aggressive, fining Google 150 million EUR and Meta 60 million EUR in January 2022 specifically because rejecting cookies took more clicks than accepting them. Where cookie processing also breaches GDPR, the Article 83 ceiling of 20 million EUR or 4 percent of global annual turnover applies.
What a Compliant Cookie Notification Must Do
Guidance from the European Data Protection Board (Guidelines 05/2020 on consent) and national regulators converges on a consistent set of requirements. Your WordPress cookie notification must:
- Appear before any non-essential cookie is set. No analytics, no advertising, no embeds until the visitor decides.
- Offer reject as prominently as accept. Same layer, same visual weight, same number of clicks.
- Use no pre-ticked boxes. The Court of Justice of the European Union settled this in Planet49 (C-673/17, October 2019).
- Separate consent by purpose. Analytics, marketing, and personalization are distinct categories the user can accept or refuse individually.
- Name the third parties receiving data, or link to a list of them from the banner.
- Link to your cookie policy from the first layer of the banner.
- Allow withdrawal at any time, as easily as consent was given (GDPR Article 7(3)). In practice this means a persistent settings link or floating icon.
- Log the consent with enough detail to satisfy the Article 7(1) burden of proof.
Two patterns that regulators have explicitly rejected: cookie walls that make site access conditional on accepting tracking, and "continuing to browse means you accept" language. The EDPB addressed cookie walls in Guidelines 05/2020, paragraph 39, and the ICO has published the same position for UK sites under PECR.
How to Add a Cookies Notification in WordPress
There are three practical routes, and the right one depends on how much tracking your site runs.
Route 1: A Consent Plugin From the Repository
Free plugins such as Complianz, CookieYes, and Real Cookie Banner install from the WordPress dashboard and handle both banner and script blocking. Search under Plugins, Add New, then activate and run the setup wizard. Expect to spend 20 to 40 minutes on the wizard because it asks which regions you serve, which services you run, and which categories to expose.
Watch for the free tier limits. Several popular plugins cap monthly banner impressions or lock geo-targeting and consent logging behind a paid plan, which matters if you are counting on those logs as evidence.
Route 2: A Hosted Consent Management Platform
A hosted consent management platform (CMP) loads through a single script tag and keeps its cookie catalog updated from an external scanner rather than a local database. This is the stronger option when you run multiple sites, use Google Consent Mode v2, or need the IAB Transparency and Consent Framework for programmatic advertising.
TermsBox works this way: a scanner crawls the site, classifies every cookie it finds, and feeds the banner and the cookie policy from the same scan. The free tier covers 5,000 banner views per month with manual scans, and Starter at $12 per month adds 50,000 views, monthly automatic scans, and documents that update when the scanner detects a new tracker.
Route 3: Custom Implementation
Coding a banner yourself is viable only if you also build the blocking layer, the category model, the persistence, and the log. Teams usually underestimate script blocking. You need to intercept scripts before the browser executes them, which on WordPress means filtering output or changing script tags to type="text/plain" with a data attribute the consent script activates later. Unless you have a specific reason, use Route 1 or 2.
Configuring the Notification Correctly
Installation is the easy half. These configuration steps are where most WordPress cookie notification setups fail an audit.
Enable script blocking, not just the banner. In Complianz this lives under Integrations; in CookieYes it is the Script Manager. Verify that your analytics and pixel scripts are listed and assigned to the right category.
Handle Google Consent Mode v2. If you run Google Ads or GA4, your consent choices must be passed to Google through the consent command with ad_storage, analytics_storage, ad_user_data, and ad_personalization signals. Google has required v2 signals for EEA and UK traffic since March 2024, and missing them degrades remarketing audiences. Our Google Consent Mode v2 setup guide walks through the implementation.
Set the correct consent lifetime. The CNIL recommends re-asking after six months; twelve months is the common ceiling. Do not set a multi-year cookie for the consent record itself.
Exclude strictly necessary cookies from the toggles. WooCommerce cart cookies, the WordPress login cookie, and CSRF tokens are exempt under ePrivacy Article 5(3) because they are strictly necessary to deliver a service the user requested. Do not offer a toggle that would break checkout.
Cookie Policy Generator
Create a cookie policy for GDPR compliance. Create yours in minutes with TermsBox.
Generate NowTest with caching enabled. WP Rocket, LiteSpeed Cache, and Cloudflare can serve a cached page that includes another visitor's consent state. Exclude the consent cookie from cache keys and confirm the banner reappears for a fresh incognito session.
Check the mobile layout. A banner that covers the entire viewport on a 375 pixel screen, or hides the reject button below the fold, fails both usability and the equal-prominence rule.
Verifying Your Cookie Notification Works
Never trust the plugin's own status page. Verify from the browser.
- Open your site in a private window with DevTools on the Application tab.
- Clear all cookies and local storage, then reload.
- Before touching the banner, list what exists under Cookies and Local Storage. Only strictly necessary entries should be present.
- Click reject. Reload. Confirm no
_ga,_gid,_fbp, or advertising cookies appear. - Click accept in a fresh session and confirm the tracking cookies now load, which proves the blocking is conditional rather than permanent.
- Reopen the preferences link and withdraw consent, then confirm the cookies are removed or stop being written.
- Repeat on a page with an embedded video, since embeds are the most common blocking failure.
If cookies appear at step 3, your notification is decorative. That is the single most common finding when auditing WordPress sites, and it is usually caused by a theme or plugin injecting scripts through a hook the consent plugin does not filter.
Pairing the Notification With a Cookie Policy
The banner and the policy do different jobs. The notification captures a decision. The cookie policy provides the information that makes the decision informed, which GDPR Articles 13 and 14 require you to supply at the point of collection.
Your cookie policy should list, for each cookie: its name, the party that sets it, its purpose, its category, and its retention period. Keep it as a table so it stays readable as the list grows. Link it from the first layer of the banner and from your footer, alongside your privacy policy.
The maintenance problem is drift. You add a chat widget in March and a heatmap tool in June, and by autumn your policy describes a site that no longer exists. Automated scanning solves this by re-crawling on a schedule and flagging new cookies, which is the difference between a document you wrote once and one that stays accurate.
Common WordPress Cookie Notification Mistakes
- Banner only, no blocking. Cookies fire on page load regardless of the click. This is the default behavior of most lightweight "cookie notice" plugins.
- Accept button styled bright, reject styled as plain text. The CNIL fines in January 2022 targeted exactly this asymmetry.
- No reject on the first layer. Requiring a trip into a settings modal to refuse is one extra click and fails the equal-ease standard.
- Two consent plugins active at once. Migrations often leave the old plugin installed, producing duplicate banners and conflicting consent cookies.
- Ignoring US state laws. The California Consumer Privacy Act as amended by CPRA uses an opt-out model, and businesses meeting its thresholds of $25 million annual gross revenue, personal information of 100,000 or more consumers or households, or 50 percent or more of revenue from selling or sharing personal information must honor the Global Privacy Control signal and provide a "Do Not Sell or Share My Personal Information" link.
- No consent log. Without timestamps and per-category records you cannot meet Article 7(1) if a regulator asks.
- Never re-testing after a theme update. A page builder update can move script output to a different hook and silently break blocking.
Frequently Asked Questions
Does WordPress have a built-in cookie notification?
No. WordPress core includes a comment cookie opt-in checkbox and a privacy policy page tool, but it does not ship a cookie notification or a consent mechanism. You need a plugin or a hosted consent management platform to block cookies before consent and record the user's choice.
Is a WordPress cookie notification legally required?
If your site sets non-essential cookies and has visitors in the EU or UK, yes. Article 5(3) of the ePrivacy Directive requires consent before storing or accessing information on a user's device, and GDPR Article 4(11) defines what valid consent looks like. Strictly necessary cookies, such as session or cart cookies, are exempt.
Why does my cookie notification appear but cookies still load?
Most cookie notice plugins only display a banner. They do not stop WordPress themes, Google Analytics, or embedded YouTube videos from writing cookies on page load. You need script blocking, which means the plugin must delay or rewrite tracking scripts until the visitor gives consent.
Can I use a cookie notification that only says the site uses cookies?
Not for EU or UK visitors. Notice-only banners with a single OK button were ruled invalid by the Court of Justice of the European Union in Planet49 (C-673/17), which confirmed that pre-ticked boxes and implied consent do not meet the standard. You must offer a reject option that is as easy to use as accept.
Do I need a cookie policy as well as a cookie notification?
Yes. The notification collects consent, while the cookie policy explains which cookies you set, their purpose, duration, and the third parties involved, as required by GDPR Articles 13 and 14. Your banner should link directly to that policy page.
How do I prove my WordPress site collected valid consent?
GDPR Article 7(1) puts the burden of proof on you, so your plugin must log a consent record containing a timestamp, the consent choices per category, the banner version shown, and a user or session identifier. Regulators such as the CNIL and ICO have requested these logs during investigations.