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