prebid / Prebid.js

Setup and manage header bidding advertising partners without writing code or confusing line items. Prebid.js is open source and free.
https://docs.prebid.org
Apache License 2.0
1.33k stars 2.09k forks source link

PrebidJS User Id module should share userIds in ORTB Eids format as well #4166

Closed pm-harshad-mane closed 4 years ago

pm-harshad-mane commented 5 years ago

Type of issue

Prebid JS User Id module shares all user Ids with bidders in an object like below.

{
    “pubcid”: “SOME_PUB_COMMON_ID”,
    “tdid”: “TTD_ID”,
    “digitrustid” : { },
    “id5id”: “”
}

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 the bid.userIdEids object into their ORTB request.

pm-harshad-mane commented 4 years ago

This is supported now, https://github.com/prebid/Prebid.js/blob/master/modules/userId/eids.md