IAB TCF V2.0 Consent
Description of how to interact with IAB consent API
How to use the TCF API
__tcfapi('addEventListener', 2, function(tcData, success) {
if(success &&
(tcData.eventStatus === 'tcloaded' || tcData.eventStatus === 'useractioncomplete')) {
// do something with tcData.tcString
} else {
// do something else
}
});__tcfapi('addEventListener', 2, function(tcData, success) {
if(success &&
(tcData.eventStatus === 'tcloaded' || tcData.eventStatus === 'useractioncomplete')) {
// do something with tcData.tcString
// remove ourselves to not get called more than once
__tcfapi('removeEventListener', 2, tcData.listenerId);
} else {
// do something else
}
});How to decode the Consent-String
Google Additional Consent Mode
Last updated