We’ve officially upgraded ConsentBit with enhanced support for the latest IAB Transparency & Consent Framework (TCF) standards
Coupon code : PRIVACY20
Cookie Compliance, 20% lighter on your budget
20% oFF
10% oFF
Safer  INternet  Day
Coupon code: SAFE10
10% oFF
Use coupon code: ENDOFYEAR
END OF YEAR SALE
Use coupon code: ENDOFYEAR

The JavaScript API

May 18, 2026

Once the ConsentBit script loads, a global ConsentBit object is available in the browser.

Common methods:

// Open the preferences panel
ConsentBit.openPreferences();

// Open the main banner (if it was dismissed)
ConsentBit.showBanner();

// Get the current consent state
const state = ConsentBit.getConsent();
// returns { necessary: true, preferences: false, analytics: true, marketing: false }

// Programmatically accept all categories
ConsentBit.acceptAll();

// Programmatically reject all non-essential
ConsentBit.rejectAll();

// Set specific categories
ConsentBit.setConsent({ analytics: true, marketing: false });

// Reset (forget) the visitor's choice , banner will reappear
ConsentBit.reset();

Frequently asked questions

No items found.
Didn’t find your answer?
Contact us here