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

Core: deferred rendering #11914

Merged
merged 5 commits into from
Sep 24, 2024
Merged

Conversation

dgirardi
Copy link
Collaborator

@dgirardi dgirardi commented Jul 2, 2024

Type of change

  • Feature

Description of change

This introduces the ability to defer rendering of bids until their billing is explicitly triggered through pbjs.triggerBilling. This is to allow "pre-rendering" (in formats like interstitial) of bids that fire billing pixels when rendered.

  • update the pbjs.triggerBilling API to accept ad units in addition to specific bids (e.g. triggerBilling({adUnitCode: '...'}) will trigger whichever bids won for that ad unit)
  • bids on ad units that have deferBilling: true, but whose bid adapter does not define a billing method (onBidBillable), are marked for deferred rendering.
  • when either a remote creative or a call to pbjs.renderAd attempts to render such a bid, it is marked as winning (BID_WON is emitted, it's added to pbjs.getAllWinningBids(), etc), but it is not actually rendered.
  • the actual rendering only happens when pbjs.triggerBilling is called.

Other information

Closes #10594

Copy link

github-actions bot commented Jul 2, 2024

Whoa there, partner! 🌵🤠 We wrangled some duplicated code in your PR:

Reducing code duplication by importing common functions from a library not only makes our code cleaner but also easier to maintain. Please move the common code from both files into a library and import it in each. Keep up the great work! 🚀

@patmmccann patmmccann merged commit 4675958 into prebid:master Sep 24, 2024
6 checks passed
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.

GPT interstitial support - deferred rendering
7 participants