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 WordPress

Last updated: February 21, 2026
This page documents the current WordPress plugin behavior for nexaguard-cmp (stable 0.2.1), aligned with the production CMP engine.

1. Overview#

NexaGuard CMP for WordPress provides:
automatic loader integration through WordPress script APIs
optional Google Consent Mode v2 defaulting in <head>
WP Consent API bridge for ecosystem interoperability
admin debug/reset tools for QA validation

2. Plugin Details#

PropertyValue
Plugin NameNexaGuard CMP
Slugnexaguard-cmp
Stable tag0.2.1
Requires WordPress5.8+
Tested up to6.8
Requires PHP7.4+
Listingwordpress.org/plugins/nexaguard-cmp

3. Install#

Option A - WordPress Admin#

1.
Go to Plugins -> Add New.
2.
Search NexaGuard CMP.
3.
Install and activate.

Option B - ZIP Upload#

1.
Download plugin ZIP.
2.
Go to Plugins -> Add New -> Upload Plugin.
3.
Upload, install, and activate.

4. Configure (Admin)#

Open NexaGuard CMP in WP admin and set:
App ID (settings-id) (required)
Auto-inject CMP Script (recommended ON)
Enable Google Consent Mode v2 (ON to inject consent default head stub)
Debug Mode (temporary QA mode)
Consent Model (WP Consent API):
optin (EU-style default)
optout (US-style default)
Notes:
assets_url and api_url are fixed by plugin runtime and not user-editable.
the old admin warning about installing WP Consent API was intentionally removed for cleaner UX.

5. Runtime Loading Order#

When enabled, plugin behavior is:
1.
<head> (early): Consent Mode stub initializes dataLayer/gtag, sets developer_id.<id>, and pushes one guarded gtag('consent','default', denied...).
2.
Footer: wp-consent-bridge.js enqueues first.
3.
Footer: CMP loader (loader.js) enqueues after bridge and receives attributes (including id="nexaguard-cmp" and data-settings-id).
Example generated loader tag shape:
If Enable Google Consent Mode v2 is OFF, head stub is skipped and loader receives data-consent-mode="off".

6. WP Consent API Bridge#

The bridge exposes:
window.NXG_WPConsentAPI.set(category, value)
window.NXG_WPConsentAPI.setAll(map)
window.NXG_WPConsentAPI.acceptAll()
window.NXG_WPConsentAPI.rejectAll()
It also listens for:
nexaguard:consent (bulk map)
nexaguard:consent:category (single category)
Canonical categories:
functional
preferences
statistics
statistics-anonymous
marketing
Default GCM-to-WP mapping:
analytics_storage -> statistics
ad_storage -> marketing
ad_user_data -> marketing
ad_personalization -> marketing

7. Shortcodes and Block#

[nexaguard_cmp] -> ensures loader enqueue
[nexaguard_preferences] -> renders privacy settings link
Gutenberg block cmp-block -> server-rendered loader enqueue path

8. Verification Checklist (Console)#

Run on a front-end page:
After Accept All:
After Reject All:
Last Consent Mode update:
Expected:
one consent default call on load (when consent mode enabled)
category updates reflected via wp_has_consent(...)
GCM update reflects current vendor/purpose selection logic

9. Troubleshooting Highlights#

IssueLikely causeFix
Banner not visiblemissing App ID or cachingset App ID, reset consent, purge cache/CDN
Duplicate bannermanual loader + plugin both activekeep a single integration path
WP categories not updatingbridge/API not availablecheck typeof NXG_WPConsentAPI and ensure WP Consent API functions are present
No Consent Mode defaultoption disabled or script ordering conflictenable Enable Google Consent Mode v2 and verify head output

10. Uninstall#

On delete, plugin removes nexaguard_cmp_options (single-site or multisite per site).

11. Related Docs#

Web Setup
Google Consent Mode v2 Validation
IAB TCF v2.3 Support
Troubleshooting Playbook
Previous
Integrate NexaGuard CMP with Webflow and Wix
Next
Integrate NexaGuard CMP with Drupal