Cookie banner adapted to GDPR, CCPA and other regulations. Google Consent Mode v2 integration. Automatic cookie scanning and blocking. Free plan available. Setup in minutes.
This is the official Drupal module for CookieOfficer, a consent management platform (CMP). It connects your Drupal site to your CookieOfficer project. You need a CookieOfficer account: there is a free plan for smaller sites, and paid plans can be tested free for 14 days.
The module adds the CookieOfficer script at the very top of the head section on every page. The banner, the cookie scan, consent categories, languages and the consent log are managed in the CookieOfficer panel, so you change them there and the site picks them up without clearing the cache.
Features
- Adds the CookieOfficer cookie banner to every page (not to administration pages and not to the Layout Builder editor).
- Sets the Google Consent Mode v2 default state before Google tags (you can turn this off). Advanced options: denied or granted for each signal and wait_for_update.
- Matches the banner language to the content language on multilingual sites (core Language module).
- Checks the setup: loads your home page and tells you if the script is missing or runs after other scripts.
- "Cookie declaration" block and a "Cookie settings" link: any link with the address
#cookieofficer-settings, for example in a menu. - Works with the Content Security Policy module.
- Drush:
cookieofficer:connect,cookieofficer:status,cookieofficer:disconnect.
Managed in the CookieOfficer panel: banner look and texts in 30 languages, geo rules, the cookie scan and categories, the consent log with downloadable proof of consent, and consent analytics.
Requirements
- Drupal 10.3 or 11, PHP 8.1 or later.
- A CookieOfficer project (app.cookieofficer.com).
Installation
composer require drupal/cookieofficerand enable the module.- Go to Configuration > System > CookieOfficer and paste your project ID.
- The banner appears on your site. Keep Google Consent Mode enabled in the CookieOfficer panel (it is on by default).
External service
This module connects to CookieOfficer, a service run by DataWolves. Without a CookieOfficer project the module adds nothing to your site. Visitors' browsers load the CookieOfficer script from https://cdn.cookieofficer.com; what is sent and when is described in the README. Terms of service · Privacy policy.
Ask your assistant about CookieOfficer
Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works
Depends on
Dependencies of the latest stable release
No dependencies recorded for this project.
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.