Event hooks
May 18, 2026
Listen for consent changes anywhere in your code:
window.addEventListener('consentbit:consent-updated', function(event) {
console.log('New consent:', event.detail);
// event.detail = { necessary, preferences, analytics, marketing, timestamp, consentId }
});
window.addEventListener('consentbit:banner-shown', function() {
// Fire your own analytics on banner impression
});
window.addEventListener('consentbit:preferences-opened', function() {
// Visitor opened the granular panel
});
Frequently asked questions
No items found.
.png)
.png)




