-
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
Introduce moduleType checks when initialising storageManager [DO NOT MERGE] #5643
Conversation
… gdprEnforcement module
@bretg I was wondering if it would be okay to introduce a table at the end of docs for the GDPR Enforcement module where we list down all the modules that have specified a GVL ID and is compatible to be used with gdprEnforcement module. |
Sounds good. You can submit the PR against the docs repo. Please word in the positive: these ones do support GVL ID. pubcommon ID is going to be a point of contention. It's not really an entity that does anything with data. I guess that's another topic for the lawyers. |
@bretg Added the table, prebid/prebid.github.io#2271 Since this table is not dynamically generated, the challenge will be to maintain it. I've got a script which I can run periodically to capture if any new modules add support for gvlid, but, should it be the responsibility of the PR author do submit a docs PR to make this table change as well? |
@Fawke per your second approach of simplifying the calls to a single method...i don't see why a single entity would have multiple GVLIDs...appnexus has one...rubicon has one. It doesn't matter why they are being called, the fact is they are and they're only registered once in the GVL (https://vendorlist.consensu.org/v2/vendor-list.json). If that simplifies the code, I'm all for it. |
@smenzer I'd prefer that there be 1 GVL ID for 1 entity ( Also, we would need to change the design of For example, currently we have:
Publisher can override the GVL IDs for any module. Now, if we give preference to moduleType as well, there will be a confusion. We will not know if we're overriding bidAdapter or the analyticsAdapter GVL ID. In that case, we'd need to be more specific. @bretg @jaiminpanchal27 Any thoughts? |
@Fawke I don't have a strong preference on how you build this, i think both approaches are fine. my point was just that from a legal perspective i don't see why there would ever be separate gvlids for a given entity (regardless of how many modules/adapters they have). |
@Fawke This looks good but external modules can make mistake here in passing this argument. Instead of adding extra argument MODULE_TYPE, I would suggest to use the user id module registry and we create registry for analytics adapters. Something similar to _bidderRegistry of adapterManager. Making Prebid core aware of all modules and its type would give extra benefit at other places. |
@smenzer I think you're right, I think we should go ahead with So, am scrapping this idea of moduleTypes for now, and I'll make a fresh commit to this PR to incorporate the new change. |
Created another PR with the implementation of the alternate approach. #5643 Please have a look. |
Closing this in favor of #5686 |
Type of change
Description of change
Related #5615
The
deviceAccessHook
in the GDPR Enforcement module had a bug where it was trying to call the functiongetGvlid()
, a function which returns GVL ID only for bid adapters, but the hook can be triggered by any module: it can be a bid adapter, user id submodule or an analytics adapter. Basically, any module which initialises thestorageManager
by calling,getStorageManager
would trigger a call to deviceAccessHook if gdprEnforcement module is included in the build.Each type of module has it own GVL ID getter function, so, if we call the
getGvlid()
function for a user id module, it'll returnundefined
since user id module should call its own function, ie,getGvlidForUserIdModule()
. Same for analytics adatpers as well.I propose a slight change where we include the
MODULE_TYPE
, along withGVL_ID
andMODULE_NAME
when calling thegetStorageManager
function. All three are optional fields and should be included if GDPR Enforcement is part of the build. That way, thedeviceAccessHook
will have a way of determining which GVL ID getter function to call based on the module type. If no module type is found, it'll default to calling thegetGvlIdForBidAdapter()
function.If everyone's fine with this approach, I plan to add a commit to this PR where I go and make the change for the modules that have specified a gvl id and are initialising the storageManager, to add the third parameter, MODULE_TYPE, in the call.
This fixes the issue with id5Id, but #5615, also mentions that
Criteo
andpubCommonId
are blocked despite having consent. That's because both haven't specified GVL ID when registering their user id submodules.I plan to create an issue calling out all the adapters & modules which haven't listed their GVL IDs. Without GVL ID, gdprEnforcement will block the module unless it's specifically listed under
vendorExceptions
by the publisher.Alternate Approach
Have a single getter function for GVL ID for all three module types: Bid Adapter, User ID Submodule & Analytics Adapter. Pros & Cons to this approach:
Pros:
moduleType
when initializinggetStorageManager()
Cons:
code
for bid adapter,provider
for analytics adapter andname
for userId submodule), we can't give them a different GVL ID. For example,appnexus
(bidAdapter) can't have GVL ID as1
&appnexus
(analyticsAdapter) have GVL ID as2
. Both should be either 1 or 2.If it is alright for all the modules of a single entity to have the same GVL ID, then the alternate approach works. But if, we wanna provide flexibility in terms of assigning different GVL ID to a bidAdapter and a analyticsAdapter for the same entity (ex - Appnexus), then this approach fails.