Postbid Example

Who should use this example:

This page contains:

  • Postbid is a third-party tag creative you setup in your ad server that loads the whole Prebid.js package. Create a line item in the ad server targeting each ad unit on your page. The creative will contain the code below.
  • If the ad unit supports multiple sizes, you'll need to do one of two things -- either create a Postbid creative for each desired size with that size hardcoded in the PBJS adunit, or use ad server macros to pass the size through to the creative. e.g. in GAM, there are HEIGHT and WIDTH macros.
  • There is no need to create line items for each price bucket as the postbid creative is served after the ad server has chosen the line item.
  • This postbid creative supports passback. See how this works below.

For tips and troubleshooting info, see:

This example uses a test version of Prebid.js hosted on our CDN that is not recommended for production use. It includes all available adapters. Production implementations should build from source or customize the build using the Download page to make sure only the necessary bidder adapters are included.

On the JSFiddle example below:

  • click 'Result' to see the output of the page.
  • Click 'Edit in JSFiddle' to open the example in a new tab.

(Sorry, jsfiddle code examples aren't available with your cookie privacy settings.)

Cookie Settings