Global Privacy Control makes a Drupal site honor the Global Privacy Control (GPC) opt-out signal. For visitors whose browser sends it, the services you mark as selling, sharing or targeted advertising stay off in Klaro, EU Cookie Compliance or COOKiES, Google Consent Mode's advertising signals are denied, and the site can show that the opt-out was honored.
Status: Stable. 1.0.0 is the first release.
Why
About a dozen US states' privacy laws require businesses to honor the signal, California's regulations require a site to show that it did, and from 1 January 2027 California requires every browser to offer the setting. The consent managers Drupal sites use do not act on it themselves.
Features
Detection that keeps pages cacheable
- The signal is read in the browser (
navigator.globalPrivacyControl). Pages are never varied on theSec-GPCheader, so cached pages stay shared. - A server-side helper for the places that must read it on the server, such as a server-side tag or an API call, which adds the right cache context when it is used.
Consent managers
- Adapters, as submodules, for Klaro (the consent manager in Drupal CMS), EU Cookie Compliance and COOKiES. In each, you select the purposes, categories or groups, and any single services, that count as sale, sharing or targeted advertising. A selected group also covers services added to it later.
- For a visitor who sends the signal, those services stay off before any of their scripts can run, and stay off after "Accept all" or any switch that turns everything on.
- Optionally, the visitor may still switch on one service at a time, after a notice next to it in the consent dialog that doing so overrides their signal.
Google Consent Mode
- An early script in the page head denies
ad_storage,ad_user_dataandad_personalizationbefore any Google tag loads, and keeps them denied whoever asks to grant them later.analytics_storagecan be added. - Optional ads data redaction and restricted data processing, and a
gpc_opt_outdata layer event for tags inside Tag Manager.
Showing and recording the opt-out
- The "Opt-Out Request Honored" status that California's regulations call for (11 CCR § 7025(c)(6)), at the bottom of every page or as a block, with your own text and a button that opens the consent manager. It is off until you switch it on.
- For signed-in visitors, the opt-out is recorded on their account, so it follows them to devices that do not send the signal.
/.well-known/gpc.json, as the GPC specification describes, and the site's policy as JSON for decoupled front ends.- Status report checks for a consent manager without its adapter, an adapter with nothing selected, a selection that no longer exists, a Klaro service Klaro never blocks, and EU Cookie Compliance misreading its "Disabled JavaScripts" on a site installed in a subdirectory (an upstream bug the module reports but cannot fix). The same checks run from Drush for deploy pipelines.
The module helps a site act on the signal. Whether a site meets a particular law is a question for its own legal advice.
Requirements
- Drupal 11.3 or later, or Drupal 12, on any database Drupal supports (MySQL or MariaDB, PostgreSQL, SQLite), any host and any theme.
- For the adapters, one or more of Klaro Cookie & Consent Management 3.1 or later, EU Cookie Compliance 1.29 or later and COOKiES Consent Management 1.2.17 or later. Each adapter needs its consent manager installed.
Installation
Install with Composer, then enable the module and the adapter for your consent manager:
composer require drupal/global_privacy_control drush en global_privacy_control global_privacy_control_klaro
The other adapters are global_privacy_control_eu_cookie_compliance and global_privacy_control_cookies.
Configuration and permissions
Go to Administration » Configuration » System » Global Privacy Control (/admin/config/system/global-privacy-control). Choose, for each installed consent manager, what counts as sale, sharing or targeted advertising and what a visitor who sends the signal may do; then the Consent Mode types, the status notice, the account record and the well-known resource. The notice and the well-known resource are off until you switch them on, because both are public statements that the site honors the signal.
- Administer Global Privacy Control (restricted): change these settings, including switching the signal off and the text every visitor who sends it reads.
What it does not cover
Consent Mode reaches only Google's own tags: other tags inside Tag Manager need a consent setting or a gpc_opt_out trigger condition, which the README explains. Sale or sharing outside the browser, such as server-side tagging or data sent from your own systems, is yours to stop, and the privacy policy statements the law requires are yours to write.
Similar projects
Checked on drupal.org in November 2026.
- Klaro Cookie & Consent Management, EU Cookie Compliance and COOKiES Consent Management are the consent managers this module works with, not alternatives to it. Their latest releases contain no GPC handling. If your consent manager adds GPC support itself, use that.
- Global Privacy Control JSON file serves
/.well-known/gpc.jsonand nothing else. It has only a development release, for Drupal 9 and 10. - Google Tag and Klaro's Consent Mode services set Google Consent Mode defaults. This module changes only the advertising signals for visitors who send GPC.
Support and maintenance
Report bugs and ask for features in the issue queue. Each release has notes describing what changed.
This project is not covered by Drupal's security advisory policy. Until it is, security issues are handled in the public issue queue and fixed in ordinary releases.
A read-only mirror is on GitHub at DanePete/drupal-global-privacy-control; development and issues stay on drupal.org.
Maintainer
Created and maintained by deadnorth (Dead North).
Ask your assistant about Global Privacy Control
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.
Activity
Releases
| Version | Type | Core | PHP | Release date | |
|---|---|---|---|---|---|
| 1.0.0 | Stable | 11 | PHP >=8.3 | Nov 27, 2026 |