Browse the documentation

In-app ads (Prebid Mobile)

Applies to: Publishers · needs the matching permission on your account

What this is#

You can sell ads inside your own iOS and Android apps. The app uses the free Prebid Mobile SDK, and this system answers it as the app's Prebid Server: banners, interstitials, rewarded video and native ads, filled by your own campaigns and by the RTB partners you sell to. No SDK of ours is needed.

Your app is registered like a website: under Websites, tick This is a mobile app and enter its bundle id. Its traffic then shows up in your statistics, zones and filters like any website's.

When you'll use this#

  • You publish an app and want to fill its ad slots from your campaigns and your RTB buyers.
  • You already run header bidding on your website and want the same demand in your app.

Step by step#

  1. Register the app. Open Websites → Add website, tick This is a mobile app and enter the Bundle id: the package name on Android (for example com.example.game), the bundle id or the numeric App Store id on iOS. This must be exactly what the app sends as its bundle. Add the Store URL; the platform is filled in from it. Apps don't need the website verification tag.
  2. Create a header-bidding campaign. Under RTB → Campaigns click New HB Campaign and add one slot per ad unit in your app. The slot id becomes the ad unit's config id in the SDK, and every slot gets its own ad zone.
  3. Copy the SDK code. Open the campaign and pick the Prebid Mobile (apps) tab. It shows the setup for iOS (Swift) and Android (Kotlin) with your account id, the server address and one ad unit per slot.
  4. Publish app-ads.txt. Put the line shown under the code into app-ads.txt at the root of the developer website listed in your store page. Buyers check it before they bid on app traffic.

What each ad unit does#

SDK ad unit What you get
Banner (BannerView) A banner of the slot's size. Clicks open the advertiser in the browser.
Interstitial A full-screen ad, in its own ad zone, so you can see its results separately.
Rewarded (RewardedAdUnit) A full-screen video that can't be skipped. Your app grants the reward when the SDK reports the ad finished.
Native Title, text and image you lay out in your app.

Targeting and ad tracking#

  • The app's advertising id (IDFA on iOS, Advertising ID on Android) is passed to buyers only when the user allows tracking. Under Limit ad tracking, or when the iOS tracking prompt was declined, it is left out.
  • Advertisers can include or exclude an app in their campaign's domain filters by writing app: and the bundle id, for example app:com.example.game.
  • In tracking links, {app_bundle}, {app_name}, {app_storeurl}, {ifa} and {lmt} fill in the app, the advertising id (empty when tracking is not allowed) and the limit-tracking flag.

Tips#

  • Use one slot per placement in the app (for example banner-home, interstitial-level-end), so each has its own statistics.
  • Test with a debug build first: the first requests create the ad zones on the app's site.
  • If nothing serves, check that the bundle id in Websites is exactly what the app sends.