Cookie Compliance for WordPress is a simple and customizable website banner that can help you meet the cookie consent requirements of the EU GDPR and CCPA regulations. It integrates seamlessly with the Cookie Compliance, a cutting-edge Consent Management Platform (CMP), to ensure that your website is up-to-date with the latest consent laws.
Get the plugin free from the WordPress.org plugin directory — 800,000+ active installs, rated 4.8 out of 5 from 3,025 ratings.
How to add a cookie banner to WordPress
There are two common ways to add a cookie consent banner to WordPress. You can paste a script into your theme’s header, or you can install a plugin. On WordPress, use the plugin. This section shows how, step by step, and how to check that the banner holds trackers back until a visitor chooses.
Why a plugin rather than pasted code
A pasted script works on sites without a content management system (CMS). On WordPress it causes problems:
- Two banners, two answers. If the plugin is also active, visitors can get two banners and two separate consent records.
- Script order breaks easily. Caching and “combine JavaScript” tools can move or merge a pasted script. The plugin tells supported optimisers to leave its script alone.
- You lose WordPress features. The plugin pulls your published settings, lets you control blocking from wp-admin, and works with the WP Consent API (see below).
The pasted snippet in the Cookie Compliance dashboard is for sites that do not run WordPress.
Before you start
- A Cookie Compliance account, or create one from inside the plugin. The Free plan needs no card.
- Permission to install plugins (or to network-activate them on multisite).
- No other cookie banner. If your theme or another plugin already shows a consent popup, plan to remove it.
Step by step
- In wp-admin, go to Plugins → Add Plugin (Add New Plugin or Add New in older WordPress versions) and search for Cookie Compliance. Before installing, check that the result is Cookie Compliance for WordPress – Cookie Consent, GDPR & CCPA by Humanityco, and that its WordPress.org address ends in
/plugins/cookie-notice/. Install and activate it. - Open the plugin’s screen, Compliance. On the Overview tab, click Connect Your Site →, then follow the steps and create an account or sign in. The plugin finds or creates this site’s app in your account and connects it for you. If your account has apps but none for this site, the plugin (3.1.13 or later) asks which app to use.
- Alternative: connect with keys. If you already have an app, or are reconnecting, enter its App ID and App Secret Key in the Domain Info card and click Connect Your Site there. Find them in the dashboard under Integrations → WordPress Integration. Plugin 3.1.12 and earlier call the key App Key. Treat it like a password.
- After changing settings in the Cookie Compliance dashboard, click Publish Now. Published changes normally reach a connected site within seconds, because our server tells the plugin to fetch them again. The plugin also refreshes when you open its admin screen, when you click Pull latest settings in the Domain Info card, and on a twice-daily schedule as a fallback.
- Leave your analytics plugins alone. You do not need to remove Site Kit, MonsterInsights or similar plugins “to make consent work”. The banner holds recognised trackers until the visitor chooses, in regions that require consent first.
- Remove any other cookie popup or consent tool still on the site.
What the plugin controls
Two blocking switches. In Compliance → Cookie Consent there are two switches (plugin 3.1.10 and later):
- Script blocking engine — the master switch. If it is off, nothing is blocked for any visitor.
- Autoblocking — holds matching third-party scripts until the visitor chooses, where the region requires it. If it is off, scripts load straight away and the visitor’s choice is applied afterwards.
Both are on by default for connected sites. If trackers fire before consent, check the engine first.
Plugins that read the visitor’s choice. The plugin registers as the consent tool for the free WP Consent API plugin. With that plugin active, cooperating plugins read the visitor’s choice and gate themselves. Our documentation lists WooCommerce, Google Site Kit, Burst Statistics, WP Statistics, Pixel Manager for WooCommerce, AddToAny Share Buttons and AFL UTM Tracker. Other recognised scripts are still covered by blocking.
Consent signals and tag managers. The plugin works with Google Consent Mode v2, Meta Consent Mode and Google Tag Manager, and honours the Global Privacy Control opt-out signal.
Caching and optimisation plugins
The plugin tells a number of optimisers not to defer, delay or combine its script, including Autoptimize, Breeze, Hummingbird, LiteSpeed Cache, Speed Optimizer and WP Rocket. See Caching plugin compatibility for the current list. With Caching compatibility switched on (the default for new installs), it also clears the page cache of supported caching plugins when banner settings change.
After a change, still clear any plugin, host or CDN cache yourself if the site shows old settings. If you use an optimiser that is not supported, exclude the banner script from defer, delay and combine yourself.
Multisite
You can network-activate the plugin. By default, each site in the network keeps its own settings and its own App ID. Some network-wide settings need network admin rights. A site admin without those rights cannot change them.
Check it works
Test as a visitor, not as an admin. The plugin does not block scripts for users who can manage the banner (administrators, by default), so use a private window while logged out.
- View the page source. The banner scripts should be near the top of
<head>, added by the plugin. There should be no second, hand-pastedhuOptionsblock. - Check the connection. In the plugin, the Domain Info card should show Protection: Active, not Not connected.
- Before you click anything, your browser’s developer tools should show no tracking cookies such as
_gaor_fbp. - After you accept, those trackers should start.
For the full check, see How to test whether your cookie banner really blocks trackers.
Plans
The plugin is free. Connected to a Free Cookie Compliance plan, blocking works up to the Free plan’s visit limit (see Pricing). Each page view where the banner loads counts as a visit. If a site goes past that limit for the current 30-day cycle, blocking and server-side consent records pause until the next cycle starts, or until you upgrade. The banner still shows, and each visitor’s choice is still stored in their browser. The Professional plan has no visit limit.
Installing the plugin does not by itself make a site compliant with any law. Depending on your settings and plan, it shows the choice, holds recognised scripts and keeps consent records. Which rules apply to your site is your decision.
Cookie Compliance is an innovative solution that provides automated compliance features and advanced design controls. It is the first to offer Intentional Consent, a framework built around equal first-layer choices, clear purpose categories and visitor control over their data. Cookie Compliance presents a user-friendly, multi-level experience and offers new options and controls to help site visitors understand and participate in data privacy decisions.
Cookie Compliance web application provides a more ethical and proactive approach to capturing and managing consent. This early version of the Intentional Consent framework is the result of Hu-manity.co’s collaboration with leading Fortune 500 companies, governments, and standards organizations. We believe that the current unequal relationship between consumers and corporations regarding data privacy and consent online is unsustainable. By making this application available to all website owners and operators we aim to eliminate the dark patterns in online consent.
Cookie Compliance for WordPress (plugin on its own)
On its own, Cookie Compliance for WordPress offers a customizable website banner that makes it easier for you to meet the cookie consent requirements. It includes the following features:
Banner features:
- Customizable notice message
- Consent on click or scroll (both optional); closing the notice counts as a refusal
- Multiple cookie expiry options
- Link to Privacy Policy page
- WordPress Privacy Policy page synchronization
- WPML and Polylang compatible
- SEO friendly
Cookie Compliance (WordPress plugin + web application)

By connecting Cookie Compliance for WordPress to the Cookie Compliance Consent Management Platform (CMP) web application you get access to the most current formatting guidelines and technical compliance requirements for over 100 countries and legal jurisdictions. The Cookie Compliance banner features include:
Banner features:
- Intentional Consent provides 3 equal buttons to give site visitors the ability to accept none, some, or all cookies through packaged choices called Data Access Levels. Data Access Levels improve consent conversion and eliminate the dark pattern of deceptive, non-equal choices in the first layer. By default, Private, Balanced and Personalized are shown side by side with equal weight in the first layer.
- Consent duration selector lets visitors see and choose how long their consent lasts. On Professional you choose which durations are offered, from 1 month to 2 years, and the chosen duration is stored in each consent record.
- Cookie purpose categories make it easy for website visitors to customize their consent by category. Visitors can open Customize, see what each of the four categories is for (Basic Operations, Content Personalization, Site Optimization, Ad Personalization) and choose which to allow.
- Consent metrics displays the visitor’s consent record and a list of blocked / allowed 3rd parties directly in the expanded level of the banner. Each visitor can see their own consent record (consent ID, date, level, categories allowed and duration) with the services held and allowed, and download it as a PDF.
- Customizable Privacy Paper provides helpful information to improve visitor comprehension and understanding of the data sharing risks and benefits. Allows you to summarize core components of your sites privacy notice and aligns with the informed principle prescribed by GDPR rules for valid consent capture.
- Configurable Privacy Contact allows you to provide contact information for a business’ data privacy admin, as well as helpful links to data subject request forms and other data privacy resources. Aligns with the informed principle prescribed by GDPR rules for valid consent capture.
Web Application features:
- Consent analytics dashboard shows event data for number of visits and provides a “trust score” to help you track how site visitors are setting their consent. Make adjustments to your banner to improve your cookie acceptance rate and monitor progress via the consent activity graph.
- Default configurations for GDPR, CCPA and more help to remove dark patterns and allow for quick and easy deployment of the consent banner without any guesswork. Customize the design of any default configuration to match the look and feel of your site.
- Automatic script blocking holds scripts and iframes that match a known tracker, or that you mark, until the visitor chooses, in regions that require consent first (GDPR and UK PECR by default). A held file may download, but it does not run. Gate tags you fire through Google Tag Manager with consent triggers, add a URL pattern for any tracker the built-in list does not recognise, and on the Free plan note that blocking pauses once the site goes past its visit limit for the current cycle.
- Consent record storage automatically stores a record of each consent and makes these records available for export (on the Free plan, records stop once the site passes its visit limit for the current cycle, and the dashboard shows and exports a 7-day log history). Each choice is saved as a consent record with a consent ID, the visitor’s country, the consent duration and the date. Records can be exported as CSV or ZIP, with your company details on every row.
- Multilingual support provides default banner text in multiple languages. On Professional you can add any further language, write your own text for every field, and show the banner in the visitor’s browser language. Free includes one added language.
- Multidomain management allows you to manage additional Free or Professional domains under a single account and enables you to customize banner configuration and design for each domain independently.
Cookie Compliance proactive approach:
For all businesses, the resources required to stay ahead of the latest regulations increases with the passage of each new law. Cookie Compliance includes built-in region rules (with Geolocation on, a Professional feature) and a dashboard check that flags settings that do not suit each law you select.
With Geolocation on (Professional), built-in region rules apply for the EU/EEA (GDPR and ePrivacy), UK PECR, California (CCPA/CPRA), other US states, Canada (PIPEDA), Brazil (LGPD) and South Africa (POPIA), plus a rule for every other region. In Manual mode you set what each rule does.
Banner design features: by default Private, Balanced and Personalized on the first layer with equal weight; nothing pre-selected on the New banner; real buttons with a visible keyboard focus ring; choice by category; an Update consent control so visitors can change their choice later; consent duration choices stored in each consent record; scrolling or clicking elsewhere never records consent on the New banner, and closing it before choosing records Private where the region requires consent first.
FAQ
Is “Cookie Notice” the same plugin as Cookie Compliance for WordPress?
Yes. The plugin’s WordPress.org address still uses its earlier name, cookie-notice. The current name is Cookie Compliance for WordPress.
Can I paste the banner code into my theme instead?
On WordPress, use the plugin. A pasted snippet next to the plugin gives visitors two banners. Without the plugin you lose its settings sync, blocking controls and WP Consent API support.
Do I need an account to use the plugin?
To get blocking, consent records and the dashboard, you connect the plugin to a Cookie Compliance account. The Free plan needs no card.
Does testing as an administrator show real blocking behaviour?
No. The plugin does not block scripts for users who can manage the banner (administrators, by default), so trackers can run for you even when they are held for visitors. Test in a private window while logged out.