A GDPR cookie banner built on the open-source vanilla-cookieconsent library
Cookie Consent shows visitors a GDPR consent banner built on the vanilla-cookieconsent library — with Necessary (always on), Analytics and Marketing categories the admin can toggle per site. Layout, colors and texts are all adjustable with no code, including a fully separate set of texts per site language.
Key features
- Built on the open-source vanilla-cookieconsent v3 library (MIT license), not a proprietary banner written from scratch
- Necessary (always on), Analytics and Marketing categories, each independently toggleable
- Layout (box/cloud/bar), position, light/dark/auto theme and a color palette configurable from wp-admin
- With WPML or Polylang active, the admin edits a fully separate set of banner texts for every site language
- Script blocking by category works via type="text/plain" data-category="analytics" — a script only runs once that category is accepted
- Built-in generator for the two legal pages GDPR needs — a Cookie Policy and a Privacy Policy
How it works
The module is a thin admin layer on top of the vanilla-cookieconsent library — settings from wp-admin (categories, colors, texts) get translated into its JS config object when the banner renders; the actual rendering and consent logic is handled by the library itself.
Script blocking uses vanilla-cookieconsent’s standard mechanism: a developer marks a script type="text/plain" data-category="analytics" instead of the normal type="text/javascript", so the browser never executes it on its own, and the library only activates it (switches it to an executable type) once that category is accepted. Without marking a script this way, a banner is just decoration with no real enforcement.
An alternative to Complianz, CookieYes (GDPR Cookie Consent), Cookiebot or Cookie Notice.