IAB TCF 2.0 API

The IAB Europe Transparency and Consent Framework (TCF) is the only GDPR consent solution built by the industry for the industry, creating a true industry-standard approach.

The reliable method for accessing IAB TCF Consent Data is through an addEventListener callback. This does not require that the CMP tag is loaded or that the IAB TCF API is ready on the page. It is the recommended way to access the current consent status.

window.__tcfapi("addEventListener", 2, (data, success) => {
  if (success) {
    console.log(data);
  }
});

IAB TCF 2.0 API

__tcfapi(command, version, callback, parameter)
__tcfapi(
  'getTCData',
  2,
  (tcData, success) => {
    if (success) {
      // do something with tcData
    } else {
      // do something else
    }
  },
  [1, 2, 3]
)

FAQ

How to fix Google Ad Manager IAB TCF 2.0 Error?

If you have seen an error message in your Google Ad Manager, the first step is downloading the report and check the error code of your site.

Please ignore a false alarm error code: Error 2.1 a.

If you can see other error codes. You can find the details of the error code on page How to fix Google Ad Manager IAB TCF 2.0 Error. It takes at least 7 days for Google to remove the error message if you are a new user of UniConsent CMP.

If you still have questions about the error message and error code, please contact by email or live chat. Our engineer will check your website manually.

Still have questions about UniConsent v2 switchover?

Contact us: support@uniconsent.com or send a message in the live chat widget on this page.