-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
set bid response id to sovrn impid #498
Changes from 2 commits
c82ceb4
1eb9f94
8d26f91
e59858d
d082eaf
3ecea76
7c821ed
62ac5eb
83a8844
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,10 +70,13 @@ function getBidSetForBidder(bidder) { | |
exports.addBidResponse = function (adUnitCode, bid) { | ||
if (bid) { | ||
//first lookup bid request and assign it back the bidId if it matches the adUnitCode | ||
let bidRequest = getBidSetForBidder(bid.bidderCode).bids.find(bidRequest => bidRequest.placementCode === adUnitCode); | ||
if(bidRequest && bidRequest.bidId) { | ||
bid.adId = bidRequest.bidId; | ||
if (!bid.adId) { | ||
let bidRequest = getBidSetForBidder(bid.bidderCode).bids.find(bidRequest => bidRequest.placementCode === adUnitCode); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I understand the best effort here, however since this is so critical to the functionality of prebid is there a way we can standardize this? Why would some bidResponses have an adId, but others would not? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bid responses vary and there was initially not much standardization as Prebid is a wrapper around existing header bidding tech. It has since become more evident that there should be more standards to improve header bidding solutions generally, and matching requested bid IDs with bid response IDs is certainly a standard we'd like to see adopted. |
||
if (bidRequest && bidRequest.bidId) { | ||
bid.adId = bidRequest.bidId; | ||
} | ||
} | ||
|
||
Object.assign(bid, { | ||
requestId: getBidSetForBidder(bid.bidderCode).requestId, | ||
responseTimestamp: timestamp(), | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be required/implemented for all adapters? This issue is not isolated to Sovrn, it is just potentially more commonly setup there and was noticed first. aardvark and triplelift are two additional examples where we will run into this issue in our current setup as we setup flex sizes for them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are working towards this approach as a requirement for adapters but opted not to implement by core team as it became too obtrusive to modify adapter code ourselves.