-
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
Fix multi-bid adId in Criteo bid adapter #3340
Conversation
A single bid request can generate multiple bids if it has multiple sizes. However, by default 'adId' will be filled with the bid request's 'bidId' field, so if we create two bids from the same bid request, they will share the same 'adId'. Because of this, Prebid will not know which bid to use once DFP makes either of those bids win, always taking the first one (see 'auctionManager.findBidByAdId' used in 'pbjs.renderAd').
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
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.
@Spark-NF Could you setup a unit-test for this scenario (or alter an existing one to cover this use-case)? We should be good at that point.
@jsnellbaker done, I added a test case covering the specific bug this PR fixes: one request generating two bids that must have different adIds. |
Thanks for making the update; LGTM. |
* Fix multi-bid adId in Criteo bid adapter A single bid request can generate multiple bids if it has multiple sizes. However, by default 'adId' will be filled with the bid request's 'bidId' field, so if we create two bids from the same bid request, they will share the same 'adId'. Because of this, Prebid will not know which bid to use once DFP makes either of those bids win, always taking the first one (see 'auctionManager.findBidByAdId' used in 'pbjs.renderAd'). * Increment Criteo adapter version * Add test for Criteo multi-bid fix
Type of change
Description of change
A single bid request to the Criteo endpoint can generate as many bids as there is sizes. However, by default
adId
will be filled with the bid request'sbidId
field, so if we create multiple bids from the same bid request, they will share the sameadId
.Because of this, Prebid will not know which bid to use once DFP asks for the creative for either of those bids, always taking the first one, which might not be the one that actually won the auction (see auctionManager.findBidByAdId used in pbjs.renderAd).