This tool is a thin wrapper arund consent tools. It offers a unified api to interact with different consent tools. It provides events, magic attributes/classes and placeholders to make it easy to use. This also works for providers which do not natively expose these api's.
pnpm i @ueberbit/consent-managerimport '@ueberbit/consent-manager'
window.addEventListener('ConsentManager:onLoad', ({ detail }) => {
console.log('ConsentManger:onLoad', detail)
})import { ConsentManager } from '@ueberbit/consent-manager/ConsentManager'
import { CookiebotProvider } from '@ueberbit/consent-manager/providers/CookieBot'
globalThis.ConsentManager = new ConsentManager(new CookiebotProvider())
window.addEventListener('ConsentManager:onLoad', ({ detail }) => {
console.log('ConsentManger:onLoad', detail)
})import { CookiebotProvider } from '@ueberbit/consent-manager/providers/CookieBot'import { EtrackerProvider } from '@ueberbit/consent-manager/providers/Etracker'