-
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
PBS adapter: fix bug with priceFloors sometimes not being set in request #8309
Conversation
This addresses prebid#8307 by picking what's likely to be the minimum floor for an adUnit (instead of just looking at the floor defined by the first request it finds, which may not be there)
@@ -755,21 +756,64 @@ Object.assign(ORTB2.prototype, { | |||
deepSetValue(imp, 'ext.prebid.storedauctionresponse.id', storedAuctionResponseBid.storedAuctionResponse.toString()); | |||
} | |||
|
|||
const getFloorBid = find(firstBidRequest.bids, bid => bid.adUnitCode === adUnit.code && typeof bid.getFloor === 'function'); | |||
const floor = (() => { | |||
// we have to pick a floor for the imp - here we attempt to find the minimimum floor |
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.
spelling on minimum
@robertrmartinez could you take this one? |
Ahhh yes, makes sense this bug existed! |
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.
Looks good, Why the decision to take the min?
I don't really know to be honest what matters just curious.
Could have also just grabbed the first valid floor found I guess.
Or the max?
Does not really matter to me, most of the time it will prob always be the same!
@robertrmartinez my reasoning is that if you don't pick the minimum one you might lose bids that would have otherwise been available - say that you somehow manage to set a floor of But I'm also not sure this makes sense - maybe the revenue from when they can beat the higher floor outweigh the lost bids. If noone thinks this is necessary, I'd rather remove the added complexity and just pick the first one. |
i find the reason to use the min here persuasive, seems safer |
Sounds good to me! |
…est (prebid#8309) * PBS adapter: fix bug with priceFloors sometimes not being set in request This addresses prebid#8307 by picking what's likely to be the minimum floor for an adUnit (instead of just looking at the floor defined by the first request it finds, which may not be there) * Do not send pricefloor if any bid cannot provide one * Test errors from currency conversion * Revert whitespace changes * fix spepelling
Type of change
Description of change
This addresses #8307 by picking what's likely to be the minimum floor for an adUnit (instead of just looking at the floor defined by the first request it finds, which may not be there)