CMS · Install guide
Cookie consent for WordPress
Updated
Add one script to your theme's header and Kiescy shows a consent banner that follows each visitor's law, blocks trackers until they agree and sends Google Consent Mode v2 signals. Works with any theme, including block themes, Elementor and Divi.
- Setup time
- About 5 minutes
- Coding
- None: copy and paste
- Laws covered
- GDPR, UK GDPR, CCPA, DPDP
- Google Consent Mode v2
- Built in, basic or advanced
Set up cookie consent on WordPress in 3 steps
- Create a free accountAdd your website. Kiescy scans it and finds the trackers that need consent.
- Paste one script into WordPressYour banner appears and starts holding back trackers until visitors choose.
- Check it worksOpen your site in a private window and run the free check to confirm nothing loads early.
Why WordPress sites need cookie consent
WordPress runs over 40% of the web, and the average site adds analytics, ad pixels, embeds and forms through plugins. Each plugin can add trackers you never chose explicitly, which is why a scan plus a banner that blocks by category matters more here than anywhere.
Your options on WordPress
| Approach | Good for | Watch out for |
|---|---|---|
| A consent plugin (Complianz, CookieYes, Cookie Notice) | Managing everything inside wp-admin | Another plugin to update; regional rules, records and Consent Mode v2 vary by plugin and plan |
| Theme or snippet banner | Developers | Usually a notice only: no blocking, no records |
| Kiescy script | Sites that also need policies, a request form and monitoring in one place | Give it top priority so it prints before other plugins' tags |
Add your privacy policy
Create a page called Privacy Policy, switch to the code editor (or add a Custom HTML block), and paste the embed. Then set it as your privacy page under Settings → Privacy.
<div data-kiescy-doc="privacy"></div>
<script src="https://script.kiescy.com/embed/policy/YOUR_SITE_KEY.js" async></script>Good to know
Put the banner script first so it can hold back trackers that other plugins add, such as Site Kit, MonsterInsights or the Meta Pixel. Caching plugins are fine: the banner decides on the visitor's device, not on the server.
Check that it works
Open your site in a private window: the banner should appear for a first-time visitor. Then run the free privacy check, which opens your site as a new EU visitor and lists anything that still loads before consent.
Kiescy's monitoring repeats that check on a schedule and emails you if a new script starts tracking before consent.
What your WordPress visitors see
Kiescy detects where each visitor is and shows the version their law requires, so you don't have to choose between the strictest banner for everyone and no banner at all.
Trackers WordPress sites usually load
These are the tools that most often need consent on WordPress sites, and how Kiescy treats them. Run a cookie scan to see exactly what yours loads.
| Tool | Category | What happens |
|---|---|---|
| Google Site Kit / Google Analytics 4 | Analytics | Adds gtag.js site-wide; held back until analytics consent |
| MonsterInsights, ExactMetrics | Analytics | Also load Google Analytics |
| Jetpack Stats | Analytics | Loads stats from WordPress.com |
| Meta Pixel / Facebook for WooCommerce | Advertising | Needs consent in the EU, opt-out in California |
| Hotjar, Microsoft Clarity | Analytics | Session recording and heatmaps |
| Embedded YouTube, Vimeo, Google Maps | Social / performance | Set third-party cookies when they load |
| WooCommerce cart and session | Essential | Needed for the cart; no consent required |
Google Consent Mode v2 on WordPress
Kiescy sends Google Consent Mode v2 defaults before any other script runs, and updates them when the visitor chooses. That covers Google tags added by Site Kit, MonsterInsights or a pasted gtag snippet.
If Site Kit's own Consent Mode setting is on, it expects a WP Consent API plugin to report choices. With Kiescy loading first you can leave it off: Kiescy already sends the signals Google needs.
New to Consent Mode? Read basic vs advanced Consent Mode v2.
Troubleshooting
The banner doesn't appear after I added the script
A caching plugin or CDN is probably still serving the old page. Clear the cache in WP Rocket, LiteSpeed Cache, W3 Total Cache or your host's panel, then open the site in a private window.
Google Analytics still loads before consent
Another plugin is printing gtag.js above Kiescy. In WPCode, give the Kiescy snippet priority 1 so it prints first, or move it directly after <head> in header.php.
My optimization plugin broke the banner
"Delay JavaScript execution" and "Combine JS" features can postpone the banner until after trackers run. Add the Kiescy script URL (script.kiescy.com, or api.kiescy.com if your tag still uses it) to the plugin's exclusion list.
Visitors see two cookie banners
Deactivate your previous consent plugin (Complianz, CookieYes, Cookie Notice, Borlabs) once Kiescy is live.
Compliance checklist for WordPress
- A consent banner that blocks non-essential trackers until the visitor agrees (opt-in for the EU, UK and India).
- A "Do Not Sell or Share" option for California visitors, and Global Privacy Control honored.
- A privacy policy that names the tools above, linked from every page.
- A cookie policy listing the cookies your scan finds.
- A way for people to request, correct or delete their data.
- Records of each consent choice, kept as proof.
- Set your privacy policy page under Settings → Privacy so WordPress links it on the login and registration screens.
- If you run WooCommerce, link your terms, refund and shipping policies at checkout.
Guides for WordPress site owners
Questions
Do I need to remove my current cookie plugin?
Yes. Running two consent tools at once leads to two banners and conflicting choices. Remove the old plugin after Kiescy is live.
Will it work with WP Rocket or LiteSpeed Cache?
Yes. If you defer or delay JavaScript, exclude the Kiescy script so it can load first.
Does it block Google Analytics added by Site Kit?
Yes. Once a cookie scan finds Google Analytics, Kiescy holds its script back until the visitor allows analytics, and it sends Google Consent Mode signals either way.
Do I need a cookie banner on WordPress?
If visitors come from the EU, UK or India and your site uses analytics, ads or embedded videos, yes. A plain WordPress site with no plugins only sets essential login cookies, but almost every site adds something that needs consent.
Does it work on WordPress.com?
On WordPress.com you need a plan that allows plugins or custom code (Business or higher) to add a header script.
Official WordPress documentation
Menus move. If a step above doesn't match what you see, WordPress's own docs show the current way to add code.
Get compliant this afternoon, not this quarter.
Set up your policies, banner and request form in one place. Free while Kiescy is in early access.