iabtcf-es
iabtcf-es copied to clipboard
Trouble For Adding addtlConsent Key in addEventListener response
Version 1.5.10
Module (core, cmpapi, cli, stub, or testing) core,cmpapi
Describe with reproduction steps – What is the expected behavior? I have successfully integrated TCF-2.2, and I possess a Google Ad Tech vendor list. I am able to generate both a tc string and AC string successfully. However, when I call the window.__tcfapi('addEventListener', 2, (tcData, success) => { console.log(tcData) }) function, I see that the addtlConsent key is not being appended in response, and the result lacks this key. I need assistance in incorporating the addtlConsent key into the addEventListener method. Can someone guide me on how to achieve this?
The TCF does not support the Google owned addtlConsent. The addEventListner doesn't return that value. You will need to implement you own eventhandler to track updates to the addltConsent.
you just need to add this json property manually to the result before you dispatch it to all event listeners.
yourTcData.addtlConsent = "consent string data"