PrivacyKit Web Components

Public web component documentation for consent-dialog, consent-guard, consent-missing, and compliance-monitor.

Table of Contents





<compliance-monitor>

Compliance Monitor observes outgoing requests and validates consent guard coverage on your live website, surfacing unmanaged trackers and regressions introduced by website changes. Inactive by default, it remains invisible to visitors and is safe to ship in production.

PropertyTypeDefault / RequiredDescription
debugbooleanfalseEnables the Compliance Monitor panel on page load. For development environments only.
delaynumber5000Network observation window (in milliseconds) before the Compliance Monitor begins validating endpoint usage and consent guard coverage.

Example

HTML
<compliance-monitor debug delay="5000"></compliance-monitor>

Compliance Monitor remains hidden from visitors even when included in the production bundle. The recommended way to activate it on a live website is to append ?pk-monitor=true to the URL — it activates the monitor only for that browser session, leaving the visitor experience unaffected.

Toggle programmatically:

TypeScriptAPI Reference
window.PrivacyKit?.toggleComplianceMonitor();