Individual Ad Unit Refresh / Infinite Scroll

This page contains:

  • Ability to refresh individual ad units - useful for infinite scrolling ad slots
  • When auto-refreshing is done incorrectly, it could cause the same bids to be rendered repeatedly. For instance, when googletag.pubads.refresh() is called directly without removing the PBJS targeting, the same hb_ variables get re-sent to GAM, re-chosen, and re-rendered. Over and over without ever asking PBJS for updated targeting variables. Please see Auction Options for more info.

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