To use a Prebid Server integration, your Adform account must be able to use server-to-server transfers. With server-to-server transfers you can include more partners/bidders into the auction without any latency on the visitor's side. To activate this feature for your inventory, contact Publishers Support (publishers@adform.com).
Once the server-to-server feature is activated, you need to set up the prebid server:
-
Choose Prebid Server Host. You have three options:
- Xandr (formerly AppNexus) host (https://prebid.adnxs.com/)
- Magnite (formerly Rubicon project) host (prebidserver@rubiconproject.com)
- Hosting prebid in your own system (Download the Prebid Server code and deploy it to your server.)
-
Download Prebid.js with Prebid Server selected and with all the other demand adapters you want to work with selected.
-
Update your site with the new build of Prebid.js. If you're using a header bidding container, update the script source inside the container, too.
-
Configure server-to-server bidder adapters. By configuring server-to-server adapters, you can specify which bidders should be called from the server-side and which from the client-side.
An example of a hybrid setup: If you have Adform, Xandr, Magnite, and PubMatic as bidders, and you specify Adform and Xandr as bidders in
s2sConfig
, the Prebid Server calls only Adform and Xandr. Magnite and PubMatic are called traditionally through Prebid.js directly from the website.The Prebid Server settings, defined by the
pbjs.setConfig
method, go to the same anonymous function where you define your ad units. Call this method beforepbjs.requestBids
.If you use one of the existing Prebid.org members as your server host, you can use the
defaultVendor
property. This property represents the vendor's default settings for thes2sConfig
. When used, these settings are automatically populated to thes2sConfig
, so you don't need to individually list out all data points. Currently,appnexus
andrubicon
values are supported.
This example represents the minimum configuration required when using the defaultVendor
option:
var pbjs = pbjs || {}; pbjs.que.push(function() { pbjs.setConfig({ s2sConfig: { accountId: '1', bidders: ['adform', 'appnexus'], defaultVendor: 'appnexus' } }); var adUnits = [{ code: 'div-ppas-mid-xxxxxx', sizes: [[300, 250]], bids: [{ /* Etc. */ }] }]; });
By including the property with the desired value in the configuration, you can override these defaults.
Example of a full s2sConfig ( )
:
var pbjs = pbjs || {}; pbjs.que.push(function() { pbjs.setConfig({ s2sConfig: { accountId: '1', enabled: true, bidders: ['adform', 'appnexus'], timeout: 1000, adapter: 'prebidServer', endpoint: 'https://prebid.adnxs.com/pbs/v1/auction', syncEndpoint: 'https://prebid.adnxs.com/pbs/v1/cookie_sync', cookieSet: true, cookiesetUrl: 'https://acdn.adnxs.com/cookieset/cs.js' } }); var adUnits = [{ code: 'div-ppas-mid-xxxxxx', sizes: [[300, 250]], bids: [{ /* Etc. */ }] }]; });
This table shows the Header Bidding Server configuration parameters.
Attribute |
Scope |
Type |
Description |
---|---|---|---|
|
Required |
String |
Your Prebid Server account ID |
|
Required |
Array of Strings |
Which bidders support auctions on the server side |
|
Optional |
String |
Automatically includes all following options in the config with vendor’s default values. Individual properties can be overridden by including them in the config along with this setting. |
|
Optional |
Boolean |
Enables server-to-server (Defaults to false.) |
|
Required |
Integer |
Number of milliseconds allowed for the server-side auctions |
|
Required |
String |
Adapter code for server-to-server (Defaults to ‘prebidServer’.) |
|
Required |
URL |
Defines the auction endpoint for the Prebid Server cluster |
|
Required |
URL |
Defines the cookie_sync endpoint for the Prebid Server Cluster |
|
Optional |
Boolean |
Initiates link-rewriting for Safari to improve cookie match rate. |
|
Optional |
URL |
Cluster-specific script for Safari link-rewriting |