Prebid Mobile – Integration Guide

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

1. Sortable Account Setup

Publisher provides Sortable with:

  • A list of apps you wish to integrate using the Prebid Mobile SDK on, and for each:
    • The app bundle id you serve on, e.g.
      • For Apple, this will be the app’s iTunes ID. For Android, it should be set to the app’s package name
    • Prebid server configuration for the app
    • A link to the privacy policy of the app
  • For each app, and ad unit
    • PREBID-MOBILE-SLOT-ID - A unique identifier for the ad unit. This will also be exposed to buyers on the exchange
    • Prebid server configuration for the ad unit.
  • A list of advertiser URLs, IAB Categories, or IAB Creative Attributes to block from bidding on your inventory

Sortable provides the publisher with:

  • The PREBID-SERVER-ACCOUNT-ID for each app
  • The PREBID-SERVER-CONFIGURATION-ID for each ad unit.
  • Lines to add to your ads.txt
  • A form to capture payment details

2. Ad Server Setup

Follow the steps to setup your line items in DFP or MoPub.

When setting up creatives in your ad server be sure to use Sortable's version of the universal creative, hosted at

The Sortable universal creative uses Sortable's cache servers by default.  An example of using Sortable's universal creative in a MoPub creative:

<script src=""></script>
  var ucTagData = {};
  ucTagData.adServerDomain = "";
  ucTagData.pubUrl = "%%KEYWORD:url%%";
  ucTagData.targetingKeywords = "%%KEYWORDS%%";
   try {
    ucTag.renderAd(document, ucTagData);
  } catch (e) {

3. Prebid Mobile SDK Integration

Follow the steps to integrate the SDK on Android or iOS.

The Sortable modifications to the SDK have not yet been merged into the prebid repository. You will need to build the latest version of the SDK from the Sortable repository at . We can also provide pre-built binaries.

When initializing the SDK, use Host.SORTABLE

Prebid.init(getApplicationContext(), adUnits, "PREBID-SERVER-ACCOUNT-ID", Prebid.AdServer.DFP, Host.SORTABLE);

4. Testing

You can request a test creative from Sortable to verify that the Mobile SDK has been integrated correctly.  Set a user targeting param with the name sortable-prebid-test with a value to indicate the CPM amount to bid.

For example, for Android, you'd use the following code to request at test bid at $100:

TargetingParams.setUserTargeting('sortable-prebid-test', '100');