Leading Consent Management Platform

Compliant with GDPR, CCPA, COPPA, LGPD, PECR, PDPA, PIPEDA, and more.

Prebid and UniConsent CMP Integration

UniConsent CMP provides internal integration with Prebid consent management modules, including IAB TCF, GPP, and CCPA.

Enable and include the following Prebid modules:

  • consentManagement
  • consentManagementUsp
  • consentManagementGpp
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();

Still have questions?

Contact us: support@uniconsent.com

Stay ahead on privacy and consent

Privacy laws, consent and compliance updates, a few emails a month.

No spam, unsubscribe any time. Privacy