amphtml
amphtml copied to clipboard
🐛 amp-consent should ignore parameter if not supported by specific command of the tcf api
closes: #36014
The goal of this PR is to make the handling command logic of the TcfApiCommandManager
more robust.
The are several vendor that are running in the error described in #36014.
I think this logic could be improved by ignoring the usage of the parameter
value unless the command is removeEventListener
.
Basically these vendors try to put their ID on the 'getTCData' command but amp-consent can't understand the request because it doesn't integrate the @iabtcf project (cmp api sub project). In fact amp-consent
on the getTCData
command simply returns the information previously acquired from the used CMP
. Precisely for this reason the logic that I have implemented is slightly more permissive because in reality that parameter is not a problem for the commands that don't support it.
Plus:
Since these commands support only the version 2, I think we can add a warn and remove also the check of the version value of the __tcfapiCall
payload and take it for granted if not provided at all. (let me know what you think)
I saw you are the assignee of the related issue @alanorozco , can you review this PR please?
Hi @erwinmombay, do you have any updates for this review?
@marco-prontera i apologies this didnt get resolved in a timely fashion. I'm looking at this now. my sincere apologies for missing this.