IAB TCF API Support

IAB TCF API Support

Overview

Pubperf is committed to helping publishers respect user privacy and comply with global data protection regulations such as the General Data Protection Regulation (GDPR). To support this, Pubperf fully integrates with the IAB Europe Transparency and Consent Framework (TCF).

By supporting the IAB TCF API, Pubperf ensures that user consent signals — regarding data processing and personalized content — are correctly interpreted and honored before collecting or processing any data.

What is the IAB TCF API?

The Transparency and Consent Framework (TCF) is an industry-standard framework developed by IAB Europe. It provides a standardized way for websites and vendors to:

  • Communicate user consent choices
  • Manage legal bases for data processing (e.g., consent or legitimate interest)
  • Ensure transparent handling of user data across the advertising ecosystem

The TCF API exposes methods that allow vendors (like Pubperf) to retrieve and respect the consent status set by the user's Consent Management Platform (CMP).

How Pubperf Uses the TCF API

When a page integrates a TCF-compliant CMP, Pubperf automatically detects and interacts with the __tcfapi function to:

  1. Retrieve consent signals
  2. Determine allowed processing purposes
  3. Ensure no personal data is collected or processed outside user consent

Pubperf specifically checks for user consent signals related to purposes such as analytics, and measurement, depending on your site’s configuration.

Example Interaction

Pubperf internally calls the TCF API to fetch the TC String and consent status:

__tcfapi('getTCData', 2, function(tcData, success) {
  if (success) {
    console.log('TC String:', tcData.tcString);
    console.log('Purposes Consent:', tcData.purpose.consents);
    // Pubperf will only activate data collection if appropriate consent is granted
  }
});

Note: No additional implementation is required on your part if a TCF-compliant CMP is already deployed on your site.

Benefits

  • GDPR Compliance — Helps ensure your site meets regulatory requirements around user consent
  • Respect for User Choice — Data is collected only when users grant explicit permission
  • Seamless Integration — Automatically works with existing TCF CMPs without extra setup

Requirements

  • A TCF v2.0 or higher compliant Consent Management Platform (CMP) deployed on your site
  • The CMP must expose the __tcfapi global function

Resources