Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX] Teads: fix production GDPR problem #5122

Merged
merged 1 commit into from
Apr 22, 2020

Conversation

valsouche
Copy link

Type of change

  • Bugfix

Description of change

We had a javascript error when gdprApplies equals false OR when there is a consentManagement module enabled but no CMP on the page when we try to access vendorData which is undefined in these cases.

We saw that apiVersion could be equals to 0. Could you please explain (or give us a link) what this value means ? As we are only using 1 and 2 from our adapter.

@valsouche
Copy link
Author

valsouche commented Apr 16, 2020

Hello,
We are struggling to understand one TCF V2 point. From our adapter, in case of cmp using V2, we are accessing isServiceSpecific directly at the top of vendorData object, but we are not sure anymore this is the good way to do.
In the source code, we saw that the vendorData object is directly the CMP one (https://github.com/prebid/Prebid.js/blob/master/modules/consentManagement.js#L374). In V1 vendorData is equal to CMPObject.getVendorConsents.
In TCFV2, getVendorConsents has been replaced by getTCData, but except for the static configuration (https://github.com/prebid/Prebid.js/blob/master/modules/consentManagement.js#L317) we don't see any usage of this getTCData.

Our question is: from the adapter, do we need to access by way : vendorData.getTCData.isServiceSpecific or this one: vendorData.isServiceSpecific ?
And if the answer is 1, that means we need to handle the case where we are in static conf, right ?
If the answer is 2, does it cover all cases ?

I hope you will be able to clarify this point.
Thanks in advance,
Valentin.

@jsnellbaker
Copy link
Collaborator

@valsouche

The getTCData() is indirectly used by the event listener that we attach to the TCF2 CMP. The response of the CMP provides (when one of the defined events triggers) is the same object response we would get if we were to directly invoke the getTCData() function against the CMP.

In our case, we normalize the data from the static approach and store the full consent data object directly under the vendorData property so that bidders don't have an extra layer to access the information they need.

So if you needed to read the isServiceSpecific field from the consent data - you should go with the latter approach you noted (vendorData.isServiceSpecific).

Please let me know if this makes sense and/or if you have any further questions on the topic.

@valsouche
Copy link
Author

@jsnellbaker

Perfect, that's pretty clear now.
All is ok for us,
thank you !

@jaiminpanchal27 jaiminpanchal27 merged commit a7f0603 into prebid:master Apr 22, 2020
@smenzer smenzer mentioned this pull request May 19, 2020
iggyfisk pushed a commit to happypancake/Prebid.js that referenced this pull request Jun 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants