Prebid Mobile Integration Guide

This feature is in ALPHA. 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. com.example.app
      • 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 https://assets.deployads.com/universal-creative/creative.js

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="https://assets.deployads.com/universal-creative/creative.js"></script>
<script>
  var ucTagData = {};
  ucTagData.adServerDomain = "";
  ucTagData.pubUrl = "%%KEYWORD:url%%";
  ucTagData.targetingKeywords = "%%KEYWORDS%%";
   try {
    ucTag.renderAd(document, ucTagData);
  } catch (e) {
    console.log(e);
  }
</script>

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 https://github.com/sortable/prebid-mobile-android/tree/master . 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);