UniConsent CMP provides internal integration with Prebid consent management modules, including IAB TCF, GPP, and CCPA.
pbjs.setConfig({
gdpr: {
cmpApi: "iab",
timeout: 3000,
allowAuctionWithoutConsent: false,
},
usp: {
cmpApi: "iab",
timeout: 500,
},
gpp: {
cmpApi: "iab",
timeout: 3000,
},
});
export default class UniConsentCMP {
static cmpReady(next) {
return new Promise((resolve, reject) => {
window.__tcfapi &&
window.__tcfapi("addEventListener", 2, function (tcData, success) {
if (tcData && !tcData.gdprApplies) {
resolve(next);
}
if (
(tcData && tcData.eventStatus === "tcloaded") ||
tcData.eventStatus === "useractioncomplete"
) {
resolve(next);
}
});
});
}
}
await UniConsentCMP.cmpReady();
Contact us: support@uniconsent.com