Skip to main content

Additional Documentation

BidRollStatus

The BidRoll library's current status.

  • DEFINED: The status when the BidRoll library is defined.
  • LOADED: The status when the BidRoll library is loaded.
  • INITIALIZED: The status when the BidRoll library is initialized.

NewPageViewInfo

New Page View Info for calling the newPageView method. This extends BidRollConfig as the method called to use this acts as a post-initialization alternative to bidroll's init function.

Properties:

  • pageViewId (Deprecated): The page view id to use for the new page view. (Type: string)
  • destroyActiveUnits (Optional): Flag to indicate whether or not to destroy active units. (Type: boolean)

UnitDesignation

Type: string | Partial<UnitConfig>

Unit Designations are the implementation reference passed to BidRoll's refresh function. BidRoll takes these designations and matches them to their corresponding preconfigured object.

Important

Please ensure the corresponding element for the unit is already rendered prior to refreshing.

For further simplicity non-incremental ad units can be passed as their string unit code and BidRoll will automatically match the configuration.

For more advanced usage you can pass a partial UnitConfig which will be applied as overrides to the corresponding configuration.

Incremental Ad Unit Handling

Incremental ad units are ad units that have a matching configuration but are rendered multiple times per client side runtime. This scenario calls for incremental ad rendering hence the name.

In cases of incremental ad units you can leverage inherit that matches an existing unit configuration and if you would like to manually manage increments you can pass in an increment as per the UnitConfig. If you pass in inherit without an increment BidRoll will automatically see this as a new increment to that unit and leverage an internal increment tracker for the inherit code. Subsequent refreshes of the same incremented ad unit will require the passing of increment.

Note: Automatic incremental unit handling will automatically generate the ad unit element id based on the BidRoll configuration function getIncElementId

Examples


const unitsToRefresh = [];

// Simple preconfigured unit
unitsToRefresh.push("leader_top");
// More advanced usage of preconfigured unit
unitsToRefresh.push({ code: "leader_middle", targeting: {cat: 'startrek'} });
// Let BidRoll's internal incremental unit handling generate the incremental unit code
unitsToRefresh.push({ inherit: 'leader_inc' });
// Manually track incremental units and refresh them
unitsToRefresh.push({ inherit: 'leader_inc', increment: 2 });
// Advanced usage applies to incremental units too
unitsToRefresh.push({ inherit: 'leader_inc', increment: 3, targeting: {cat: 'startrek', inc: 3}});


bidroll.refresh(unitsToRefresh);

PrebidBidResponse

Interface representing a Prebid bid response. This interface contains the properties received from Prebid bid response.

Properties

  • adId: The ad ID for the bid response.
  • adUnitCode: The ad unit code for the bid response.
  • size: The size of the ad for the bid response.
  • bidder: The bidder name for the bid response.
  • cpm: The cost per thousand (CPM) for the bid response.
  • pbLg: The price bucket lower granularity for the bid response.
  • pbMg: The price bucket medium granularity for the bid response.
  • pbHg: The price bucket high granularity for the bid response.
  • pbAg: The price bucket auto granularity for the bid response.
  • pbDg: The price bucket dense granularity for the bid response.
  • pbCg: The price bucket custom granularity for the bid response.
  • currency: The currency for the bid response.
  • netRevenue: Whether the bid response is net revenue or not.
  • ttl: The time to live (TTL) for the bid response.
  • responseTimestamp: The timestamp when the bid response was received.
  • requestTimestamp: The timestamp when the bid response was requested.
  • timeToRespond: The time taken to respond to the bid request.
  • creativeId: The creative ID for the bid response.
  • mediaType: The media type for the bid response.
  • dealId (Optional): The deal ID for the bid response if available.
  • adserverTargeting: The ad server targeting information for the bid response.
  • native (Optional): Native ad information for the bid response if available.
  • status: The status of the bid response ("targetingSet" or "rendered").
  • statusMessage: The status message of the bid response ("Bid returned empty or error response" or "Bid available").
  • ad (Optional): The actual ad HTML content for the bid response.
  • adUrl (Optional): The URL to the ad for the bid response.
  • meta (Optional): Metadata for the bid response.
  • requestId (Optional): The request ID for the bid response.
  • auctionId: The ID of the auction for the bid response.

BrPrebidBid

Interface representing a custom extended Prebid bid response with additional properties. This interface extends the PrebidBidResponse interface.

Properties

  • bmStatus: The status of the bid response in the BidRoll library.
  • bmStatusMessage (Optional): The status message of the bid response in the BidRoll library.
  • expiration: The expiration time for the bid response.
  • origin: The original ad unit of the bid response.