Then each bidder needs to pass these IDs to adapter server end-point in a preferred format.
Some bidders like PubMatic, PulsePoint, Rubicon, PrebidServerBidAdapter use ORTB format, these bidders need to put the UserIds in ORTB.user.ext.eid format.
For each new UserID these bidders need to make code changes which are similar for each adapter.
If UserID module shares userIds in ORTB format as well then these bidders will not need to update code to support each new user Id.
Solution
We can add an ORTB format function in each userId submodule (like id5, digitrust).
ORTB format function of each sub-module will be called by index.js of userID module and an array of eids will be passed along with the current bid.userId object to each bid object.
Then bidders can simply copy/merge the bid.userIdEids object into their ORTB request.
Each userId sub-module provides an ortbFormat function
UserId module will call ortbFormat function to get eids in ORTB format for each submodule
UserId module will keep the current plain object bid.userId
UserId module will add a new object bid.userIdEids which will have an ORTB eids array
Each ORTB supporting bidder will copy bid.userIdEids into request.user.ext.eids
Type of issue
Prebid JS User Id module shares all user Ids with bidders in an object like below.
Description
Then each bidder needs to pass these IDs to adapter server end-point in a preferred format. Some bidders like PubMatic, PulsePoint, Rubicon, PrebidServerBidAdapter use ORTB format, these bidders need to put the UserIds in ORTB.user.ext.eid format. For each new UserID these bidders need to make code changes which are similar for each adapter. If UserID module shares userIds in ORTB format as well then these bidders will not need to update code to support each new user Id.
Solution
We can add an ORTB format function in each userId submodule (like id5, digitrust). ORTB format function of each sub-module will be called by index.js of userID module and an array of eids will be passed along with the current
bid.userId
object to each bid object. Then bidders can simply copy/merge thebid.userIdEids
object into their ORTB request.bid.userId
bid.userIdEids
which will have an ORTB eids arraybid.userIdEids
intorequest.user.ext.eids