Skip to content

Commit

Permalink
fix(priceFloors): retrieve matching bid request (#8025)
Browse files Browse the repository at this point in the history
  • Loading branch information
JulieLorin authored Feb 8, 2022
1 parent 90239aa commit dc4ab54
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/priceFloors.js
Original file line number Diff line number Diff line change
Expand Up @@ -672,8 +672,11 @@ export function addBidResponseHook(fn, adUnitCode, bid) {
if (!floorData || !bid || floorData.skipped) {
return fn.call(this, adUnitCode, bid);
}

const matchingBidRequest = auctionManager.index.getBidRequest(bid)

// get the matching rule
let floorInfo = getFirstMatchingFloor(floorData.data, null, {...bid, size: [bid.width, bid.height]});
let floorInfo = getFirstMatchingFloor(floorData.data, matchingBidRequest, {...bid, size: [bid.width, bid.height]});

if (!floorInfo.matchingFloor) {
logWarn(`${MODULE_NAME}: unable to determine a matching price floor for bidResponse`, bid);
Expand Down

0 comments on commit dc4ab54

Please sign in to comment.