Skip to content
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

Merged
merged 3 commits into from
Dec 19, 2018

Conversation

Spark-NF
Copy link
Contributor

Type of change

  • Bugfix

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's bidId field, so if we create multiple 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 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).

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').
@stale
Copy link

stale bot commented Dec 17, 2018

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.

@stale stale bot added the stale label Dec 17, 2018
@derdeka
Copy link
Contributor

derdeka commented Dec 17, 2018

@mkendall07 ?

@stale stale bot removed the stale label Dec 17, 2018
@jsnellbaker jsnellbaker self-requested a review December 17, 2018 20:25
Copy link
Collaborator

@jsnellbaker jsnellbaker left a 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.

@Spark-NF
Copy link
Contributor Author

@jsnellbaker done, I added a test case covering the specific bug this PR fixes: one request generating two bids that must have different adIds.

@jsnellbaker
Copy link
Collaborator

Thanks for making the update; LGTM.

@jsnellbaker jsnellbaker merged commit e5f4255 into prebid:master Dec 19, 2018
pedrolopezmrf pushed a commit to Marfeel/Prebid.js that referenced this pull request Mar 18, 2019
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants