Skip to content

TCF API Validation

Last updated: February 18, 2026

Use this guide to verify that TCF API signals are available and consistent.

typeof window.__tcfapi

Expected: function.

If not available:

  • confirm CMP script loaded successfully
  • confirm no CSP block
  • confirm no duplicate or outdated CMP script
window.__tcfapi('getTCData', 2, (data, ok) => {
console.log({ ok, tcString: data && data.tcString, eventStatus: data && data.eventStatus });
});

Expected: valid tcString after user choice.

window.__tcfapi('addEventListener', 2, (data, ok) => {
if (ok) console.log('TCF event:', data.eventStatus, data.tcString);
});

Expected: event updates when consent state changes.

4. Validate Disclosed Vendors Segment (High Level)

Section titled “4. Validate Disclosed Vendors Segment (High Level)”

For enterprise reviews, confirm that your decoder or verification tool indicates disclosed vendor information is present for configured vendor sets.

  • cmpStatus: stub persists (CMP did not initialize fully).
  • eventStatus never moves beyond loading state.
  • TC string present but stale after preference change.

Include:

  • Settings ID
  • affected URL
  • browser and version
  • output of checks from this page
  • debug report from Cybexo Debug Tool