| 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-assets-url | Asset path inferred from src | Point loader at a staging asset endpoint. |
data-cdn-url | https://cdn.nexaguard.com | Override config/GVL CDN base for staging or isolated environments. |
data-developer-id | dZTNmYW | Override Google developer ID signal for approved deployments. |
data-consent-mode | on | Set to "off" to skip loader-level Consent Mode default bootstrap on load. |
.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.consent update with all four signals = granted.| Call | Purpose |
|---|---|
window.showCMPBanner(force?) | Reopen CMP UI (true forces reopen). |
window.__tcfapi(...) | Standard TCF API endpoint (ping, getTCData, addEventListener, displayConsentUi, etc.). |
window.__gpp(...) | Standard GPP API endpoint (ping, addEventListener, getGPPData, etc.). |
window.nxgDebugConsent(showUI?) | Runs consent diagnostics; optional UI overlay when true. |
ad_storageanalytics_storagead_user_dataad_personalizationconsent update with current values.data-consent-mode="off", loader-level default bootstrap is skipped.“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.
default is emitted before Google tags.update is emitted after user action.window.__tcfapi is available for TCF deployments.window.showCMPBanner(true) or __tcfapi('displayConsentUi', 2, ...).#nexaguard-cmp element remains.