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

Prebid core: restore bid-level renderer #9128

Merged
merged 1 commit into from
Oct 19, 2022

Conversation

dgirardi
Copy link
Collaborator

Type of change

  • Bugfix

Description of change

Allow renderer to be specified at the bid-level. This was working, although (to the best of my knowledge) undocumented, until 6.9.

Other information

Fixes #9126

Copy link
Contributor

@musikele musikele left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -690,7 +690,7 @@ function getPreparedBidForAuction(bid, {index = auctionManager.index} = {}) {
events.emit(CONSTANTS.EVENTS.BID_ADJUSTMENT, bid);

// a publisher-defined renderer can be used to render bids
const adUnitRenderer = index.getAdUnit(bid).renderer;
const bidRenderer = index.getBidRequest(bid)?.renderer || index.getAdUnit(bid).renderer;
Copy link
Collaborator

@patmmccann patmmccann Oct 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the rendering order of priority if all four are present the following?

Mediatype
Ad unit
Bid
Adapter

And if backup only is specified the order is:
Bid
Adapter
Media type
Ad unit

Correct?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fowler446 perhaps you've spent the most time on this recently, is this your understanding as well?

Copy link
Collaborator Author

@dgirardi dgirardi Oct 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first one of these wins:

  1. mediaType
  2. adUnit.bid[]
  3. adUnit
  4. bid response

if any of the first 3 say backupOnly, they will be disregarded as long as the bid response has its own renderer.

@patmmccann patmmccann self-assigned this Oct 19, 2022
@patmmccann patmmccann merged commit e459b91 into prebid:master Oct 19, 2022
JacobKlein26 pushed a commit to nextmillenniummedia/Prebid.js that referenced this pull request Feb 9, 2023
jorgeluisrocha pushed a commit to jwplayer/Prebid.js that referenced this pull request May 23, 2023
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.

Bid-level renderer not working
4 participants