| Package | <script id="nexaguard-cmp" …> |
| Minimum | Evergreen browsers · ES6 |
| Footprint | ≈ 12 kB gzipped loader |
<script> as high as possible in your <head>:| Attribute | Value | Description |
|---|---|---|
data-settings-id | e.g. NXG-Zmk9Zy0c1X | Identifies your site’s branding & vendor list. |
| Attribute | Default | Use-case |
|---|---|---|
data-api-url | https://api.nexaguard.io | Override for self-hosted API. |
data-assets-url | CDN path inferred from src | Point loader at a staging CDN. |
data-consent-mode | on | Set to "off" to disable Google Consent Mode defaults/updates and revert to tag blocking. |
.tpl file from your dashboard..tpl.

gtag.js or any Google Ads/Analytics tags.
NexaGuard CMP v1.0) and click Publish.
consent default fired at Consent Initialization.denied for EEA/UK/CH, granted elsewhere.consent update with all four signals = granted.| Call | Purpose |
|---|---|
initialize(settingsId) (auto) | Loads branding & GVL; stores consent. |
showBanner({ force }) | Displays banner even when consent stored. |
acceptAllSelections() / rejectAllSelections() | One-click options in second layer. |
Note: Consent Mode is a technical solution for tag management and measurement.
It does not by itself ensure legal compliance (such as with GDPR).
For more details and implementation options, see:
Consent Mode – Basic
Consent Mode – Advanced
data-consent-mode="on" explicitly or enable it in the dashboard.data-consent-mode="off". This reverts to full tag blocking.“We use cookies to personalize ads and measure performance. Learn more at Google’s Privacy & Terms.”
ad_storageanalytics_storagead_user_dataad_personalizationhttps://cmp.nexaguard.com/?nxg_debug_ui=1 (interactive audit overlay).This configuration automatically fulfills Google’s banner requirements (section v).
| Parameter | Behavior |
|---|---|
?nxg_debug=1 | Runs a background audit and logs a JSON report to the browser console. |
?nxg_debug_ui=1 | Opens a floating NexaGuard Consent Audit overlay on screen with live updates. |
https://example.com/?nxg_debug_ui=1ad_storage, analytics_storage, ad_user_data, ad_personalization).consent default, gtag('js'), and gtag('config').Tip: Use this mode during audits or integration tests to confirm your gtag()and Consent Mode defaults fire in the correct order.
