This is an overview of the public JavaScript API functions available when using HB Manager
Basic Functionality
- relevantDigital.loadPrebid() - This is the fundamental function for loading ads with HB Manager. For some customers this will be the only function ever used in the API. Please read this documentation first as it also contains basic examples on usage of HB Manager.
Custom configuration of Prebid.JS and Amazon UAM/TAM
- relevantDigital.addPrebidConfig() - To be used as a replacement for pbjs.setConfig() in Prebid.JS.
- relevantDigital.addAmazonConfig() - To be used as a replacement for apstag.init() in the Amazon JS API.
Instream video
Code example and explanations: Instream video with HBM and GAM
- relevantDigital.defineVideoSlots() - Create VideoSlot elements that can be loaded by the normal call to relevantDigital.loadPrebid().
- relevantDigital.loadVideoUrls() - Wait for URLs to VAST XML documents loaded by combining relevantDigital.defineVideoSlots() and relevantDigital.loadPrebid().
- relevantDigital.Auction.registerImpressionByAdId() - Manually register an impression. Necessary for headerbid reporting when using Google's IMA SDK.
Other functionality
- relevantDigital.destorySlots() - Function to be used in Single Page Applications (SPA) when navigating between content.
- relevantDigital.getConfigs() - This function lists the Prebid configurations in the site.
-
relevantDigital.addAuctionCallbacks() - Function for setting up global callback functions / listeners.
- relevantDigital.getInstance() - Returns the internal root object of the Yield environment.
- relevantDigital.getAdUnitInstanceByBid() - Function for obtaining placement-information such as the ad slot from a Prebid.js bid object.
- relevantDigital.getBidderHandler() - Returns a "handler" for a bid's bidder. Most importantly it contains the id of the SSP in Yield.
- relevantDigital.aliasBidder() - Function to be used as a substitute for pbjs.aliasBidder() - in very specific situations.