-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
ID modules initialized before requestBidsHook do not receive consentData #6738
Labels
Comments
1 task
@smenzer I don't see the difference between the two pages you provided (except for the textarea). What I see is:
Is it because I am implicitly declining consent? I am not prompted about it. |
@dgirardi are you based in the EU? If not, gdpr doesn't apply and the page will work fine. |
appears to be solved by #8201 |
also appears to be a dupe of #5447 |
Repository owner
moved this from Blocked
to Done
in Prebid.js Tactical Issues table
Apr 28, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Type of issue
Bug
Description
There are a few ways that ID submodules are initialized - via the
requestBidsHook
and in thegetUserIds()
,getUserIdsAsEids()
, andrefreshUserIds()
functions. Whichever one of these that are called first is what dictates how the submodule is initialized and subsequent calls to another function doesn't reinitialize them.The problem is that if a call to
getUserIds()
orgetUserIdsAsEids()
is called before therequestBidsHook
fires, then it's not guaranteed that the CMP would have returned consent data to prebid-core yet and the submodules get initialized withconsentData
beingundefined
. When therequestBidsHook
fires, the submodules are already initialized and are not called again. This means that the submodules never get consent data and, assuming the submodule follows GDPR properly, there would be no ID available from the provider, even if the user did consent.Steps to reproduce
I have two test pages to show the behavior
Consent Data correctly passed into the ID5 submodule: https://samples.id5.io/prebid/basic
pbjs.getUserIds()
Consent Data missing because
getUserIdsAsEids()
is called at the bottom of the page prior to therequestBidsHook
: https://samples.id5.io/prebid/basic-with-bug.html0
and no gdpr consent string is passedIf you are flipping back and forth between these pages, make sure to refresh a few times to clear out the cache - the ID5 module will make new calls to ID5 every 10 seconds.
Expected results in the "Prebid Bug" page
I'm open to two different approaches here:
1) Delay the functions until after the modules are initialized properly with consent data
getUserIds()
orgetUserIdsAsEids()
is called before the submodules are initialized by therequestBidsHook
, they should be put in a queue and responses delayed until the modules are initialized, then they return like normal2) Re-initialize with consent data if it becomes available
getUserIdsAsEids()
should call ID5 if there is no data in cache, or use the ID from cache if available (this works as expected today)requestBidsHook
, and consent data is available when therequestBidsHook
fires, then the submodules should be reinitialized and allow the modules to use the consent dataI think option 1) is a better approach, but open to other ideas as well.
cc @padurgeat
The text was updated successfully, but these errors were encountered: