Consent & your CMP
Connect your existing banner without collecting before permission.
On this page
Choose a consent mode
The built-in banner offers analytics with separate optional recording and identification choices. External mode delegates the choice UI to your CMP. Both modes require the site's valid HTTPS notice and enabled collection. Cookieless mode also requires consent.
External CMP integration
- Install the tracker with data-consent="external" and your HTTPS privacy notice.
- Wait until the tracker is ready and the CMP has a valid visitor decision.
- Grant analytics only after the visitor allows it; pass optional purposes only when separately allowed.
- Call denied immediately when the visitor withdraws analytics permission. Your CMP must persist and restore the decision in external mode.
window.weeveo.setConsent("granted", {
recording: false,
identification: false
});
// Analytics withdrawal stops collection and clears persistent identity.
window.weeveo.setConsent("denied");Change optional purposes
Call setConsent again with the complete current set of allowed purpose flags. Omitting a flag makes that purpose false. A purpose flag does not enable a server-disabled feature or override DNT/GPC. Recording is also blocked on private paths.
Inspect and react
window.addEventListener("weeveo:consent", () => {
const choice = window.weeveo.getConsentRecord();
console.log(choice.status); // Keep actual visitor choices out of public logs.
});Built-in choices are versioned and expire after 180 days; changed notice URL, mode or consent version can invalidate them. A refusal in another tab stops collection. A cross-tab grant does not silently broaden this tab's purposes.
Missing data after acceptance
Inspect getConsentRecord(), hostname settings, the HTTPS notice, server collection state and browser privacy signals. Accepting a banner does not override exclusions. See verification.
Still looking for an answer? Try troubleshooting or get in touch.