Prebid.js icon indicating copy to clipboard operation
Prebid.js copied to clipboard

User id module overrides ortb2.user.ext.eids content

Open leonardlabat opened this issue 2 years ago • 10 comments

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

  1. Call setBidderConfig and set some eids under ortb2.user.ext.eids structure
  2. Set some user id module on the page
  3. 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.

leonardlabat avatar Jul 10 '24 13:07 leonardlabat

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:

  1. Update ortbConverter as a stopgap, which may be enough if you're only dealing with adapters that use it.
  2. Make eids part of first party data (https://github.com/prebid/Prebid.js/issues/9951), appending and not overriding pub-provided EIDs
  3. Bidders should then stop using bid requests' userId/userIdAsEids and pick up ortb2.user.ext.eids instead
  4. Remove both userId and userIdAsEids from bid requests for prebid 10.

dgirardi avatar Jul 10 '24 14:07 dgirardi

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?

patmmccann avatar Jul 11 '24 12:07 patmmccann

@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

patmmccann avatar Jul 11 '24 12:07 patmmccann

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.

FlorentDancy avatar Jul 15 '24 09:07 FlorentDancy

@dgirardi is step one of your proposal ready for dev? we received another report of this concern

patmmccann avatar Jul 19 '24 15:07 patmmccann

Can Prebid ensure its id, SharedID, is not overridden? Kind of like The Highlander, there can only be one, right?

dmdabbs avatar Aug 01 '24 16:08 dmdabbs

the PubProvided module is definitely where a publisher derived user id should land.

jdwieland8282 avatar Aug 01 '24 19:08 jdwieland8282

@dmdabbs I think your request deserves its own issue, opening one

patmmccann avatar Aug 01 '24 20:08 patmmccann

The merged list will have multiple SharedIDs, right? Would that be a sufficient indicator that publisher has supplied additional ID?

pycnvr avatar Aug 02 '24 00:08 pycnvr

Closing with https://github.com/prebid/Prebid.js/pull/12110

dgirardi avatar Aug 26 '24 15:08 dgirardi