Prebid Core: Fix wrong targeting being applied when multibid module is included#21
Open
i-atanasov-az wants to merge 9 commits intomasterfrom
Open
Prebid Core: Fix wrong targeting being applied when multibid module is included#21i-atanasov-az wants to merge 9 commits intomasterfrom
i-atanasov-az wants to merge 9 commits intomasterfrom
Conversation
* **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.
jbartek25
approved these changes
Jan 31, 2025
3c675ba to
07c74f0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of change
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:
Other information
prebid#12273