Skip to content

Conversation

@i-atanasov-az
Copy link

@i-atanasov-az i-atanasov-az commented Jan 31, 2025

Type of change

  • Bugfix

Description of change

The refactor of targeting.js introduced in 9.16.0 relies on getHighestCpmBidsFromBidPool returning sorted bids and then when a winning bid should be chosen it simply reduces the sorted bids. The logic in getHighestCpmBidsFromBidPool, though, returns unchanged bids when hasModified is true. But getHighestCpmBidsFromBidPool is hookable and multibid in it's targetBidPoolHook sets hasModified to true when multibid is enabled causing bids not to be sorted and the winning bid chosen for targeting is the first rather than the best bid.

Changes:

  • Puts back the logic from before the change to choose the winning bid inside the getWinningBids method instead of choosing the winning bid as the first bid for the ad unit, relying on getHighestCpmBidsFromBidPool returning already sorted bids.
  • Changes the logic of getWinningBidTargeting to use getWinningBids instead of reducing the bidsReceived
  • Adds adUnitCodes to function interfaces

Other information

prebid#12273

lshishkov and others added 8 commits October 2, 2024 00:07
* **Type:** Fix
* **Scope:** improvedigitalBidAdapter
* **Subject:** Bid floors are always converted to USD.
* **Details:**
* Adds `DEFAULT_CURRENCY` variable which is set to USD
* Adds `convertBidFloorCurrency` function which in used to convert the bid floor when both `imp.bidfloor` and `imp.bidfloorcur` are present, and `imp.bidfloorcur` is not equal to the adapter's `DEFAULT_CURRENCY`;
* **Breaks:** N/A
…ed to USD;

* Removes rounding of bid floor when converting its currency to USD;
* remove redundant checks for type and NaN from `convertBidFloorCurrency` function
…urrency-convertion

Improve Digital Bid Adapter: Bid floor is sent in USD when possible
…etWinningBids instead of the using the hookable getHighestCpmBidsFromBidPool which has a logic to return bids unchanged, to sort them causing wrong targeting being applied when multibid module is included.
@i-atanasov-az i-atanasov-az self-assigned this Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants