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

Set bid response ID to bid request ID

Open protonate opened this issue 10 years ago • 3 comments

With commit 34e6874455111658d8ba39173f6b80824c6a7452 we have implemented a means to set the bid response ID to the bid request ID. When creating a bid response in an adapter using the bidfactory module, the requested bid object can now be passed as a second parameter to createBid, and the ID of the bid request will be set as the ID of the bid response. This is required to identify a bid request/response pair in situations where there may be more than one bid request from a given bidder for a given placement in a given auction.

Adapter maintainers may wish to implement this feature now, and we will be including this in Prebid adapter requirements soon. We'll have more details in the next release notes. The commit referenced above provides an implementation example for the Sovrn adapter.

cc: @prebid/all-contributors @sovrnoss @nanek

protonate avatar Aug 09 '16 17:08 protonate

Would it make sense to deprecate the 1 and 2 codes in the createBid function?

We would simply mark a bid valid or invalid based on required input params to the addBidResponse function. Specifically if cpm > 0 && (bid.ad || bid.adUrl)

mkendall07 avatar Aug 12 '16 01:08 mkendall07

I'm planning to make PRs for two adapters we use that would benefit from this. The existing implementation in sovrn looks up the bidRequest and passes that to createBid (https://github.com/prebid/Prebid.js/pull/498). The appnexusAst implementation uses a different object and sets the bidId and passes that to createBid (https://github.com/prebid/Prebid.js/pull/526). Both work and both seem reasonable to me.

Any suggestions on which approach to take when implementing this on other adapters (1) looking up the bidRequest and passing that or (2) passing the bidResponse with a bidId value. Thanks.

nanek avatar Aug 18 '16 18:08 nanek

@protonate do we have an updated list who doesn't do this yet?

mkendall07 avatar Dec 21 '16 15:12 mkendall07