iabtcf-es icon indicating copy to clipboard operation
iabtcf-es copied to clipboard

Trouble For Adding addtlConsent Key in addEventListener response

Open naeem-epi opened this issue 1 year ago • 2 comments

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?

naeem-epi avatar Jan 09 '24 10:01 naeem-epi

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.

HeinzBaumann avatar Jan 09 '24 18:01 HeinzBaumann

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"

mredl avatar Feb 07 '24 07:02 mredl