Show Menu

Using IAB TCF 2.0 with the Adobe Experience Platform Web SDK extension

This guide shows how to integrate the Interactive Advertising Bureau Transparency & Consent Framework, version 2.0 (IAB TCF 2.0) with the Adobe Experience Platform Web SDK without using Experience Platform Launch. For an overview of integrating with IAB TCF 2.0, read the overview . For a guide on how to integrate with Experience Platform Launch, read the IAB TCF 2.0 guide for Experience Platform Launch .

Getting started

This guide uses the __tcfapi interface for accessing the consent information. It might be easier for you to integrate directly with your cloud management provider (CMP). However, the information in this guide might still be useful because the CMPs generally provide similar functionality to the TCF API.
These examples assume that by the time the code is run, window.__tcfapi is defined on the page. CMPs can provide a hook where you could run these functions when the __tcfapi object is ready.
To use IAB TCF 2.0 with Experience Platform Launch and the AEP Web SDK extension, you need to have an XDM schema available. If you have not set either of these up, start by viewing this page before proceeding.
Additionally, this guide requires you to have a working understanding of the Adobe Experience Platform Web SDK. For a quick refresher, please read the Adobe Experience Platform Web SDK overview and the Frequently asked questions documentation.

Using the setConsent event

The IAB TCF 2.0 API provides an event for when the consent is updated by the customer. This occurs when the customer initially sets their preferences and when the customer updates their preferences.
The following example shows one way to do this:
const identityMap = { ... };
window.__tcfapi('addEventListener', 2, function (tcData, success) {
  if (success && tcData.eventStatus === 'useractioncomplete') {
    window.alloy("setConsent", {
      consent: [
          standard: "IAB TCF",
          version: "2.0",
          value: tcData.tcString,
          gdprApplies: tcData.gdprApplies

This code block listens for the useractioncomplete event and then sets the consent, passing the consent string and the gdprApplies flag. If you have custom identities for your customers, be sure to fill in the identityMap variable. Refer to the guide on supporting consent for more information on calling setConsent .

Next steps

Now that you have learned how to use IAB TCF 2.0 with the Adobe Experience Platform Web SDK extension, you can also choose to integrate with other Adobe solutions such as Adobe Analytics or Real-time Customer Data platform. See the IAB Transparency & Consent Framework 2.0 overview for more information.