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
Contributor

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
Contributor 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
Contributor 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
banesto pushed a commit to banesto/Prebid.js that referenced this pull request Apr 27, 2020
* commit '8db2720d60a6533dee52e96f847854ef1c219345': (249 commits)
  Release 3.17.0
  LunaMedia Adapter (prebid#5110)
  UserId module to export user ids as eids with pbjs.getUserIdsAsEids() (prebid#5108)
  Triplelift: expose tl_souce in bid response (prebid#5139)
  Add warning messages for publishers while native ads send assets containing url without sendId  (prebid#5096)
  use customSlotMatching func for reseting targeting (prebid#5132)
  Teads fix production GDPR error (prebid#5122)
  No bid version 1.2.5 (prebid#5137)
  SublimeBidAdapter src/url.js import fix (prebid#5150)
  Improve Digital adapter: add support for outstream video (prebid#5129)
  Disallowing remote requests from Safari and Firefox due to browsers no longer supporting DigiTrust ID. (prebid#5109)
  PS bid adapter update to copy site object from config (prebid#5083)
  SublimeBidAdapter: Update to version 0.5.1 (prebid#4977)
  LuponMedia Bid Adapter (prebid#5146)
  [BUGFIX] AdagioBidAdapter getDataFromLocalStorage (prebid#5081)
  Revert "New LuponMedia Bid Adapter (prebid#5120)" (prebid#5145)
  New LuponMedia Bid Adapter (prebid#5120)
  Feature/send publisher domain (prebid#5121)
  update test adunit params (prebid#5135)
  add parameter to the conversant adapter to override the url (prebid#5133)
  ...
@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