Postbid Example

Who should use this example:

About this example:

  • 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. For example, in Google Ad Manager 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.

In the JSFiddle example below:

  • Click Result to see the example output.
  • Click Edit in JSFiddle to open the example in the JSFiddle editor in a new tab.

This example includes all available adapters and modules. Production implementations should build from source or customize the build using the Download page to make sure only the necessary bidder adapters and modules are included.

Further Reading