User id module overrides ortb2.user.ext.eids content
Type of issue
Bug
Description
If a publisher uses the setBidderConfig API to set manually some identifier in the ortb2.user.ext.eids structure, and if the publisher also uses some user id module, then unfortunately the bidder adapters will get only the eids resolved by the user id module.
Most likely this is because this row https://github.com/prebid/Prebid.js/blob/master/modules/userId/index.js#L1199 overrides the potential existing value instead of merging the eids.
Steps to reproduce
- Call
setBidderConfigand set some eids underortb2.user.ext.eidsstructure - Set some user id module on the page
- Look at the ortb2 request received by the bidder adapter
Expected results
My bidder adapter is called with a request that contains both the eids set through the setBidderConfig call and the eids resolved by the user id module.
Actual results
My bidder adapter is called with a request that contains only the eids resolved by the user id module.
The line you linked affects only some adapters (those that use shared ortb2 conversion utilities). In general this needs to be done adapter by adapter.
A workaround is to use pubProvidedId, which is essentially a userId wrapper around eids. However it only allows a single set of EIDs which can be restricted to some bidders, not different EIDs for different bidders.
Related to https://github.com/prebid/Prebid.js/issues/9951 and the deprecation of bidRequest.userId mentioned in the 9.0 release notes.
Proposal:
- Update ortbConverter as a stopgap, which may be enough if you're only dealing with adapters that use it.
- Make eids part of first party data (https://github.com/prebid/Prebid.js/issues/9951), appending and not overriding pub-provided EIDs
- Bidders should then stop using bid requests'
userId/userIdAsEidsand pick uportb2.user.ext.eidsinstead - Remove both
userIdanduserIdAsEidsfrom bid requests for prebid 10.
setBidderConfig wasn't a known pattern to me for telling bid adapters about IDs, pubProvidedId has been how we've imagined people do this, although it hasn't been without complaints. Is setBidderConfig popular, is this hypothetical, or something in between?
@dgirardi is step 1 above simply to merge instead of set in the line @leonardlabat mentions?
Of note @leonardlabat is an adapter maintainer of grid and criteo adapters
Is setBidderConfig popular, is this hypothetical, or something in between?
For context, the reason we developed the support to collect user IDs via setBidderConfig() is that some publishers told us that they didn't want to have to install another module (pubprovidedid) to pass a user ID to us, so passing it via setBidderConfig() was easier for them.
@dgirardi is step one of your proposal ready for dev? we received another report of this concern
Can Prebid ensure its id, SharedID, is not overridden? Kind of like The Highlander, there can only be one, right?
the PubProvided module is definitely where a publisher derived user id should land.
@dmdabbs I think your request deserves its own issue, opening one
The merged list will have multiple SharedIDs, right? Would that be a sufficient indicator that publisher has supplied additional ID?
Closing with https://github.com/prebid/Prebid.js/pull/12110