Setting up Prebid.Js

Widespace header bidding solution is today designed after the open source library “prebid.js”. If you are not yet familiar with the Prebid.js documentation we recommend that you have a closer look at their ‘getting started guide’ before continuing. The guideline can be found here.

 

Widespace Bid Object

To add Widespace as a bidder you need to add the following object to adUnits.bids:

Parameter Value Type Optional/Required Comment
bidder widespace string Required Name of the widespace bidder implementation.
params.sid string Required Provisioned and provided by Widespace.
params.currency ISO 4217 string Optional Explicitly specify the currency for the returned bid. If left out, the default currency of your account in Widespace will be used.

 

Ad Unit sizes

In order for your ad unit sizes to work you need to make sure that it’s supporting the same ad format sizes that Widespace Adspace supports. The various format sizes that you can use today is as follows:

Format Size
Panorama [320, 53]
Panorama XL [320, 160]
Takeover [320, 320]
Interstitial [320, 480]

 

Code Example

Widespace are supporting and recommending to support several formats/sizes in one Adspace in order to optimise your supply after the existing demand. In the below code example we’re adding Widespace as a bidder for two different div id’s ‘div-gpt-ad-1460505748561-0‘ and ‘div-gpt-ad-1460505661639-0‘ where one is only supporting a specific format/size and the other one is supporting several formats/sizes:

 

## Note that the SID needs to be replaced with your own ##
 
var adUnits = [{
      code: 'div-gpt-ad-1460505748561-0',
      sizes: [[320, 320]]
      bids: [{
          bidder: 'widespace',
          params: {
             sid: '7b6589bf-95c8-4656-90b9-af9737bb9ad3'
             currency: 'EUR'
          }
      }]
  },{
      code: 'div-gpt-ad-1460505661639-0',
      sizes: [[320, 53], [320, 160], [320, 320]],
      bids: [{
          bidder: 'widespace',
          params: {
            sid: '7b6589bf-95c8-4656-90b9-af9737bb9ad3',
            currency: 'EUR'
          }
      }]
  }];

 

 

Do you have any questions or need further guidance?

Feel free to contact integrations@widespace.com and we’ll do our very best to help you out!

Was this article helpful to you?