NexaGuard
  1. Web-and-CMS-Integrations
NexaGuard
  • Getting-Started
    • NexaGuard Developer Documentation
    • Quickstart (5 to 10 Minutes)
    • Documentation Overview
    • Concepts and Glossary
  • Compliance-and-Standards
    • Compliance Overview
    • IAB TCF v2.3 Support
    • Google Consent Mode v2 Validation
    • TCF API Validation
    • Audit Checklist (Pre-Launch)
  • Web-and-CMS-Integrations
    • NexaGuard CMP SDK – Web & GTM Setup
    • Integrate NexaGuard CMP with Webflow and Wix
    • Integrate NexaGuard CMP with WordPress
    • Integrate NexaGuard CMP with Drupal
    • Integrate NexaGuard CMP with Shopify
  • Mobile-SDKs
    • NexaGuard CMP SDK - iOS Setup
    • iOS SDK API Reference
    • NexaGuard CMP SDK - Android Setup
    • Android SDK API Reference
    • App Attribution Partner (AAP) Integrations
  • Developer-Reference
    • Web JS API Reference
    • Consent Event Schema
    • Deployment and Environments
    • NexaGuard Debug Tool
    • Troubleshooting Playbook
    • Performance and Best Practices
    • Accessibility and UX Guidelines
    • Localization Workflow
    • Migration Guide
  • Security-and-Privacy
    • Security Overview
    • Privacy Architecture
    • Data and Logging Transparency
    • Subprocessors
    • CSP and Network Allowlist
  • Enterprise-and-Legal
    • DPA and Legal Pack
    • RFP Feature Matrix
    • Status and Reliability
    • Support and Escalation
    • NexaGuard CMP SDK – Commercial Licence
  • Operations
    • Changelog and Version Policy
  1. Web-and-CMS-Integrations

Integrate NexaGuard CMP with Drupal

The NexaGuard Consent Management Platform (CMP) provides an enterprise-grade solution for GDPR, ePrivacy, and Google Consent Mode v2 compliance in Drupal.
This guide describes the complete installation, configuration, and verification process for the NexaGuard CMP Drupal Module.

Overview#

NexaGuard CMP enables Drupal websites to collect, manage, and transmit user consent signals to third-party services like Google Ads, Google Analytics, and other marketing tools.
The module works seamlessly across Drupal 9, 10, and 11, automatically injecting the CMP loader script into your site’s <head> section.
Once installed, the module will:
Display a customizable consent banner across all pages.
Capture and store user consent preferences.
Handle Google Consent Mode v2 default and update events automatically.
Maintain compliance with privacy regulations globally.

Module Details#

PropertyValue
Module NameNexaGuard CMP
PackagePrivacy
DescriptionIntegrates NexaGuard Consent Management Platform into Drupal for GDPR and Google Consent Mode v2 compliance.
Core compatibilityDrupal 9, 10, 11
LicenseGPL-2.0-or-later
MaintainerNexaGuard Inc.
Project URLhttps://www.drupal.org/project/nexaguard_cmp

Requirements#

Drupal 9 or higher
PHP 8.1 or higher
Administrator privileges to install modules
A valid NexaGuard CMP account and Settings ID

Installation#

Option 1 — Install via Composer#

Option 2 — Manual Installation#

1.
Download the latest release from the Drupal project page:
https://www.drupal.org/project/nexaguard_cmp
2.
Extract the archive to /modules/custom/nexaguard_cmp or /modules/contrib/nexaguard_cmp.
3.
Enable the module:
Extend → NexaGuard CMP → Enable
4.
Clear caches (drush cr or via the admin interface).

Configuration#

1.
Navigate to Configuration → System → NexaGuard CMP.
2.
Enter your Settings ID (from your NexaGuard dashboard).
3.
Configure additional options:
✅ Auto-inject CMP Script.
✅ Enable Google Consent Mode v2.
✅ Inject only for anonymous users.
✅ Exclude admin pages from injection.
4.
Click Save Configuration.

Script Injection Behavior#

After configuration, the module automatically injects the CMP loader script into the <head> of all public pages:
The module ensures this script is loaded only once and integrates seamlessly with Drupal caching systems.
If Google Consent Mode is enabled, it automatically executes gtag('consent', 'default') and gtag('consent', 'update') events based on user consent.

Verification#

Option 1 — Browser Developer Tools#

1.
Open your site and inspect using Developer Tools (F12).
2.
In the Network tab, filter for “loader.js” or “consent”.
3.
Confirm that loader.js is loaded from https://cmp.nexaguard.com and consent events are triggered.

Option 2 — Google Tag Assistant#

1.
Install Google Tag Assistant.
2.
Record your session and reload the page.
3.
Verify “Consent Mode active” and gtag('consent', 'update') events after user action.

Option 3 — NexaGuard Debug Mode#

Add ?nxg_debug=1 to your site URL.
Example: https://example.com/?nxg_debug=1
The debug overlay will show banner status, consent categories, and Consent Mode values.

Advanced Options#

FeatureDescription
Anonymous Users OnlyDisplays the banner only to logged-out visitors.
Exclude Admin RoutesPrevents CMP injection on /admin/* pages.
Debug ModeAdds CMP overlay for consent diagnostics.
Custom Asset URLsAllows custom CMP endpoints for testing or staging environments.

Troubleshooting#

IssueCauseSolution
CMP banner not visibleMissing or invalid Settings IDVerify the ID in NexaGuard CMP configuration
CMP script duplicatedCached theme injectionClear caches and verify only one <script> appears
Consent Mode inactivegtag or Tag Manager misconfiguredEnable Google Consent Mode v2 option
Admin pages affectedExclude Admin Routes disabledEnable the exclude admin option under configuration

Uninstallation#

1.
Navigate to Extend → NexaGuard CMP → Uninstall.
2.
Run the following commands if using Drush:
All configurations are safely removed.

Security and Compliance#

NexaGuard CMP ensures your site meets major international privacy standards:
GDPR (General Data Protection Regulation)
ePrivacy Directive (EU Cookie Law)
Google Consent Mode v2
CCPA / CPRA (California)
All communications are performed via HTTPS with TLS encryption.
User consent preferences are stored securely and anonymized.

Verification for Google Audit#

Module provides guided setup with configuration UI.
CMP loader injects automatically into all public pages.
Google Consent Mode default and update signals function as required.
Public documentation and release available at https://www.drupal.org/project/nexaguard_cmp.
This module fully satisfies Google’s Gold Tier x.3.a (3+ CMS integrations) requirement.

Enterprise References#

Compliance Overview
IAB TCF v2.3 Support
Google Consent Mode v2 Validation
CSP and Network Allowlist
Troubleshooting Playbook

Support#

For help or inquiries, contact our support team:
📧 [email protected]
🌐 https://www.nexaguard.com

© NexaGuard Inc. — All Rights Reserved.
Version: 1.0.4 | Last Updated: February 18, 2026
Previous
Integrate NexaGuard CMP with WordPress
Next
Integrate NexaGuard CMP with Shopify