...
Push Price Priority Line Items to your publisher adserver (for instance GAM for those using Google’s adserver) using the defined price granularity and setup specific for that adserver.
This Python project does a good job for users semi-familiar with the Ad Manager API and Python
Use the key-values 'sharethrough' per the bidder parameters documentation from Prebid.
Configure the ad units for which you want the
sharethrough
bidder to return bid responses. Sharethrough supports banner , native and video impression requests .
[**native remains unsupported in PrebidJS, but available through PBS (Go and Java]).. See the Prebid documentation for adunit configuration. It provides definitions for all the supported fields and examples for various types of ads.
The important fields are:code
: Associates the ad unit configuration with an ad slot on the page.mediaTypes
: The type of ads to serve. E.g. banner, video, native, etc.bids
: Bidder specific parameters.You must define the sharethrough bidder and associate this ad unit with a PubMaestro placement key using
pkey
ortb2Imp
: Optional parameters supported by OpenRTB. For example, you could configure a floor price, block advertiser domains or block IAB categories.Example:
Code Block language js <script> var adUnits = [ { code: 'my-html-div-tag-id', mediaTypes: { banner: { sizes: [[300,250]] } }, bids: [ { bidder: "sharethrough", params: { pkey: 'pkey1', } } ] }, ] pbjs.que.push(function() { pbjs.addAdUnits(adUnits); }); </script>
Request bids and render the winning ads
Call
pbjs.requestBids
to request bids for all ad units. This is typically called when the page loads or when an ad slot comes into view.The
bidsBackHandler
parameter is a callback function to call once the bid responses are received to render the winning ads.Code Block <script> pbjs.que.push(function() { pbjs.requestBids({ bidsBackHandler: renderAllAdUnits, // Your rendering logic here }); }); </script>
Examples:
Without an ad server: https://docs.prebid.org/dev-docs/examples/no-adserver.html
With an ad server: https://docs.prebid.org/dev-docs/examples/basic-example.html
Sharethrough should immediately start competing in your header bidding auctions.
...