Prebid Adapter Integration Guide

This feature is in BETA. Reach out to your account manager for more information.

0. Prerequisites

You must update to Prebid.js version 1.17.0 or later to access the Sortable adapter. If you are not planning to update to this version, please speak to your Sortable account manager.

1. Sortable Account Setup

Publisher provides Sortable with:

  • A list of sites you wish to integrate the adapter on, and for each:
    • The domains you serve on, e.g. example.com
    • A link to the privacy policy of the site
    • The current ad quality solution being used (if applicable)
  • A list of advertiser URLs, IAB Categories, or IAB Creative Attributes to block from bidding on your inventory

Sortable provides the publisher with:

  • The siteId for each site to use in the adapter
  • Lines to add to your ads.txt
  • A form to capture payment details

2. Ad Server Setup

If you've configured prebid.js to send the top bid to your ad server, there is no change required to enable the Sortable adapter.

If you've configured prebid.js to send all bids to your ad server, follow the prebid.js documentation to create new line items in your ad server using sortable as the BIDDERCODE.

3. Adapter Configuration

3.1 Add the global configuration

Add the Sortable configuration in a setConfig block using the provided siteId. The userSync config allows Sortable to inject sync pixels in an iframe.

Prebid 1.0

pbjs.setConfig({
  sortable: {
    siteId: 'example.com'
  },
  userSync: {
    filterSettings: {
      iframe: {
        bidders: ['sortable'],
        filter: 'include'
      }
    }
  }
});

Prebid 0.34

In Prebid 0.34, the userSync config is slightly different. Note that setting iframeEnabled: true  will enable iframe cookie sync for all enabled header bidders.

pbjs.setConfig({
  sortable: {
    siteId: 'example.com'
  },
  userSync: {
    iframeEnabled: true
  }
});

3.2 Set Sortable tagId for each ad unit

Change the ad unit configuration (in the bids property of the adUnit you want to change to Sortable) to include the sortable bidder and a tagId as shown below.

Any publisher-defined string can be used as the tagId. Sortable recommends using a unique tagId to represent each placement on your site. This tagId shows up in reports and is visible to buyers.

var adUnits = [{
  code: '/19968336/header-bid-tag-1',
  mediaTypes: {
    banner: {
      sizes: [[300 250]]
    }
  },
  bids: [{
    bidder: 'sortable',
    params: {
      tagId: 'tag-1'
    }
  }]
}];
pbjs.addAdUnits(adUnits);

For further information, see this Basic Prejbid.js Example or the Prebid Quick Start

Optional Parameters

The Sortable adapter supports the following optional parameters.  They can be specified in the params section of each ad unit:

Param NameDescriptionExample
floor

The minimum CPM (in USD) accepted for a bid.

0.25
floorSizeMap

In a multi-size request, this sets the floor for each size. This overrides the floor param.

{"300x250": 1.25,
"300x600": 5.50 }

4. Testing

Once the adapter is configured, use the ?sortable-prebid-test=true query parameter to test the adapter. Loading a page with this query parameter triggers Sortable to bid with a $100 bid. If you see the Sortable logo, the successful bid won the auction and was rendered on the page.

FAQ

Can I use a siteId on any domain?

Each top level domain must be whitelisted by Sortable. To onboard additional domains, reach out to your Sortable account manager.

How is a tagId defined?

A publisher can use any string (characters, underscores) as a tagId. Sortable does not need to know the value ahead of time. Sortable recommends using a unique tagId to represent each placement on your site. This tagId shows up in reports and is visible to buyers.

How is the floor parameter used?

Sortable passes along the floor parameter to buyers in the auction. Bids that return below the floor are filtered out of the results. A bid is only returned if it is higher than the floor. 

Note: Setting a floor may decrease the number of eligible bids and overall revenue.

Change Log

Prebid.js VersionComment
1.17.0Sortable Adapter Added
1.18.0Added support for the floorSizeMap param
0.34.19Sortable Adapter Added to the legacy release