NexaGuard
  1. Developer-Reference
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. Developer-Reference

Web JS API Reference

Last updated: February 21, 2026
This reference covers documented public API methods for web integrations.

1. Show CMP UI#

window.showCMPBanner(force?)
Purpose:
opens/reopens the CMP UI
Parameters:
force (boolean, optional): when true, reopens UI even if prior consent exists
Example:

2. TCF API#

window.__tcfapi(command, version, callback, parameter?)
Purpose:
standard IAB TCF API endpoint exposed by the CMP runtime
Common supported commands:
ping
getTCData
addEventListener
removeEventListener
displayConsentUi
Example:

3. GPP API#

window.__gpp(command, callback, parameter?, version?)
Purpose:
standard IAB GPP API endpoint exposed by the CMP runtime
Common supported commands:
ping
addEventListener
removeEventListener
getGPPData

4. Debug Helper#

window.nxgDebugConsent(showUI?)
Purpose:
runs runtime diagnostics for Consent Mode ordering and TCF availability
Parameters:
showUI (boolean, optional): when true, opens debug overlay UI
Examples:

5. Notes#

API availability depends on successful loader initialization.
Keep custom calls behind existence checks in production.
Consent action internals are handled by CMP UI and are not exposed as public web JS methods.
Recommended guard:
Previous
App Attribution Partner (AAP) Integrations
Next
Consent Event Schema