Self-Testing Your Creative

This tutorial is a step-by-step guide that shows you how to self-test your creatives using the MoPub Sample App.


What: The MoPub Sample App is a simple, yet fully functional iOS/Android reference implementation of the MoPub-SDK intended to demonstrate how any creative/tag would render and behave across various ad formats for any MoPub-integrated app.

We have a MoPub Sample App for iOS and a Sample Google Play Store app (which can access globally from an icognito browser).

Supported ad sizes on the MoPub platform:

  • Phone: Banner (320×50), MRect (300×250), Fullscreen (320×480) and Native (custom defined dimensions)
  • Tablet: Leaderboard (728×90), MRect (300×250), Fullscreen (1024×768) and Native (custom defined dimensions)

Why: Being able to use the MoPub Sample App provides a way of seeing exactly how a creative/tag would render/behave in any live app that is integrated properly with the MoPub SDK.

Who: The MoPub Sample App can be used by anyone who has a stake in how a particular creative/tag renders/functions in a MoPub-integrated app:

  • Publisher/developer: Use the MoPub Sample App as a reference implementation to troubleshoot possible MoPub-SDK integration issues against
  • Demand-side partner: Use the MoPub Sample App as a reference implementation for how all MoPub-integrated inventory will behave/function so you as the DSP can focus on developing the creative that works across various publishers’ apps.
  • Rich-media partner: Rich-media certifications

Step 1: Create a MoPub publisher test account

  1. Create an account at

    IMPORTANT: For compliance reasons, you must complete all payment information on the MoPub account payments page. This is not optional.

    Payment Information

  2. Create a new “test app” and ad unit (ad placement) that you will eventually serve your own creative tag to.

    What you are actually doing here is creating an unique _ instance _ of the MoPub Sample App. eg: “JoeSchmoes_iOS_TestApp”

    Navigate to the ‘Inventory’ tab and click ‘Add a New App’

    Add a New App

  3. Select iOS or Android and name your test app something descriptive ie: DSP_RMCertification_TestApp_iOS

    NOTE: It is assumed that these apps will be used ONLY for non-revenue-generating internal testing purposes. Enter a dummy value for the iTunes URL/package name ( or com.fake.MyOwnTestApp)

    • Primary and secondary categories can be set to any value
  4. Select the platform and ad format you wish to test with and add a descriptive name

    NOTE: If you are a DSP testing VAST video; select “Fullscreen” (phone:320×480 or tablet:1024×768) as your ad format.

    • A single ad unit (ad placement) will be automatically created for you when you first create a “new app” in the UI
    • The refresh interval field defines the time period in which an ad unit will self-refresh and make a request to MoPub to display another ad
  5. Click “Save and View Code Integration”

    • Note the provided ad unit ID, you will need this later.
    • Best practices on app/ad unit setup:
      • An app can contain one or more ad units
      • Each ad unit has a ‘dimension’ associated with it (320×50, 1024×728, etc etc) and can either be of type ‘phone’, or ‘tablet’
      • Each ad unit should only have a single line-item serving to it. This line-item should only contain a single creative that matches the ad unit in dimension
    • To add an additional ad unit to an already existing app:
      • Click the ‘Inventory’ tab in the UI, select the app you want to add an ad unit to, then select “Add an ad unit”

      Add an Ad Unit

      • Below is an example of an Android app that has 3 separate ad units (320×50, 300×250, 320×480)&nbsp Android app example

Step 2a: Set up a line-item to serve your new ad unit placement

Now that you have created an ad unit placement, you need to create an order and line-item(s) to serve a creative/tag to your ad unit.

Best practices on order/line-item setup:

  • An order can contain one or more line-items
  • Each line-item should contain a single creative/tag of a single dimension (ie: 320×50) that targets a single ad unit with the same dimensions
  1. Create a new order

    • Navigate to the “Orders” tab and click “Add a New Order”

    Add a New Order

  2. Create an order and line-item with the following settings:

    • Order name: Name it something that describes the type of line-items you are creating (ie: MRAID_certification_iOS only)
    • Advertiser: ‘None’

    Order Details

  3. Under “Step 1 – Add a Line Item”

    • Type: “Guaranteed”
    • Priority: ‘1’
    • Name: Name your line-item with as much detail as possible as it relates to the platform/tag size you will be serving (ie: MRAID-cert-Android-Phone-320×50)
    • Start/Stop Time: Do not modify
    • Budget/Rate/Speed: Do not modify
    • Day Part Targeting: Do not modify

    Add a Line Item

  4. For Step 2 – “Ad Unit Targeting’ – This particular step of the self-testing process is the most common source of UI configuration errors.

    • Find the ad unit this line-item will target and click the ‘checkbox’
    • Remember, each line-item will be configured to serve a single creative/tag of a single dimension to a single ad unit.

    If you are testing creatives/tags of different sizes to differently sized ad units, you must set up a separate line-item that serves an ad unit of only that size.

    Ad Unit Targeting

  5. At this point, you have just created a line-item that will serve a single creative to a specified ad unit.

  6. (Optional) To set up additional line-items for serving tags/creatives to additional ad units

    a. Click the “Orders” tab in the UI

    b. Find and click the order in which you created your line-item in the previous step

    c. In the top right, click “Add a New line-item”

    Add a New Line Item

    d. Complete steps #1 (Add a line-item) and #2 (Ad Unit Targeting) of the “New line-item” page. Ensure your line-item targets a single ad unit.

    If your tag can be served to BOTH iOS and Android, It is perfectly valid for a line-item of a particular size (let’s say 320×50) to serve to both 320×50 iOS and Android ad units.

Step 2b: Supported Network Partner Setup

  1. Set up a network on your account & target the ad unit you created in Step 1.
  2. After the network is setup and targeting an ad unit, skip to step 4
  3. See step 7 for troubleshooting
    • Note: Do not use the same IDs that were provided in the Placements Doc for the MoPub Test Account

Step 3: Upload your creative ad-markup/tag into your line-item

IMPORTANT: If you are a DSP attempting to setting up the end-to-end testing process with your bidder and the MoPub Marketplace, skip this step

  1. Click ‘Add a New Creative’ to start importing your creatives/tags to test

    Add a New Creative

    NOTE: MRAID creatives can not be previewed using the ‘preview’ tool in the UI. You must traffic MRAID creatives into the MoPub Sample App in order to view them.


  2. Configure your creative:

    • IMPORTANT: When adding a new creative; Ensure the format of the creative matches the format of the ad unit your line-item is targeting **
    • Creative type –> ‘HTML’
    • Name –> Use something descriptive ie: MRAID iOS 320×50 creative
    • Paste in your creative’s tag/ad markup
    • If applicable, click ‘MRAID Ad’
    • Click ‘Save’


  3. You are now ready to traffic your creative through the Simple Ads Demo!

Step 4: Install and load your creatives; in the MoPub Sample App

Install the MoPub Sample App and load creatives on your iOS/Android test device

4a) iOS

NOTE: The iOS sample app hosted on this page will always be integrated with the latest MoPub iOS SDK . When a new SDK is released; you must re-install the latest version from this page . The app will NOT auto-update on your test device.

  1. Open the MoPub Sample App for iOS on your iOS test device (iPhone or iPad) –
  2. Click “INSTALL”; then open the app once installed (located on your phone’s home screen)
  3. Once you open the app; click the ‘!’ icon in the top left corner of the main screen to to display the SDK version your sample app is integrated with. Confirm that this SDK version matches the most up-to-date version by checking our iOS MoPub SDK release notes.

4b) Android

NOTE: The Android app hosted on this page will always be integrated with the latest MoPub Android SDK. When a new SDK is released; the sample app should auto-update via the Google Play store service.

  1. Search the Google Play Store for “mopub” on your Android test device (phone or tablet)and download/install the “MoPub Sample App”. (Link here)
  2. Click “Install”, then open the app once installed.
  3. Once you open the app; check the bottom of the main screen for “SDK Version”. Confirm that this SDK version matches the most up-to-date version by checking our Android MoPub SDK release notes.

4c) Load and display your creatives in the MoPub Sample App

  1. Retrieve the ad unit ID you had previously written down. The ad unit ID can also be found in the URL of your ad unit of the MoPub UI. (See below)

    Ad Unit ID URL Location

    1. Open the MoPub Sample App on your test device
    2. Add your own ad unit ID that you had previously set up in steps 1-3

      iOS Android
      iOS Sample App Screenshot Android Sample App Screenshot
    3. Select the “Ad Type” (banner, interstitial, etc) that corresponds to that specific ad unit. This must match your ad unit’s size configuration in the UI.

    IMPORTANT: Select ‘Interstial’ for the ad type if you are testing VAST video

  2. Carefully enter your ad unit into the “Ad Unit Id” field

    TIP: To avoid typos, email the ad unit ID to your test device and copy/paste it into this field

  3. Enter a descriptive name under ‘Name’ (eg: Testing MRAID banner for Nike campaign). The name does not need to match what is configured in the UI

  4. Click ‘Save’

  5. Select your new ad unit from the main page and click ‘Load Ad’. Your creative should render.

Step 5: Enabling your Account for the MoPub Marketplace

If you are a DSP that has been directed to this process to configure an end-to-end test environment in the live Marketplace, your account will need to be configured such that bid requests from your ‘instance’ of the MoPub sample app will be seen by _ only _ your bidder; ie: a private marketplace for your own test purposes.

NOTE: Marketplace access will be disabled by default in your account when the account is first created which can be enabled only by MoPub staff. Please follow the following steps:

  1. Complete steps #1 and #6 above in the Self-Testing guide.

  2. Contact your dedicated account team OR with the following subject and information:

    • subj – “DSP/MoPub Sample App End-to-End Test set up request”
    • MoPub UI account email address
    • App name(s) and the specific ad unit you want to target against in the Marketplace
  3. Your account team or a member of our Support Team will respond back when your account has been configured for end-to-end testing in the Marketplace

Step 6: End-to-end testing via Marketplace and MoPub Sample App

  1. Login to your [MoPub Demand Platform][] account and make sure your account is active.
  2. Ensure your bidder is properly setup to return a valid MoPub 2.3 bid response.
  3. Follow steps outlined in #4c above to make sure your adunit has been added to the sample app.
  4. Select your newly created adunit. This will send a bid request to your endpoint.
  5. A successful test should display the ad on the sample app.

Step 7: Troubleshooting and Best Practices

  1. Ad does not load on test device

    • DSPs
      • Triple check that your ad unit ID is entered correctly
      • Confirm all settings under “Geo, Connectivity, and Device Targeting” in your line-item are as unrestricted as possible
      • Ensure ad unit ID device type (iOS/Android) and size matches the device type you are testing on
      • Ensure creative type/size (banner/interstitial) (step 3) matches the ad unit size that you intend on trafficking that specific creative to
      • Try clicking refresh/load a few times, waiting ~1 min, refresh/load again
    • Server-to-Server Networks
      • Triple check that your ad unit ID is entered correctly
      • Make sure the network is live on that ad unit.
        • The network should have a green arrow next to it when you navigate to the ad unit ID. If it does not, please make sure there is a CPM set in the Segments Page. (Network Tab -> Segments)
      • Ensure you are responding within 300ms
  2. VAST video tag not loading
    • VAST video testing must be performed through end-to-end testing in the MoPub Marketplace.
    • See step 5 to set up end-to-end testing”
  3. The “Preview” feature in UI does not properly preview my creative
    • Is your creative MRAID?
      • If yes; only HTML/JS creatives will render in this feature; MRAID creatives must be trafficked/tested in the sample app
      • If not; please confirm whether your creative renders successfully in any other environments
  4. Our bidder is not seeing bid requests from our MoPub Sample App in the open Marketplace

    • Ensure “Marketplace”” is enabled and running for the ad unit you are testing on
    • Your account’s access to Marketplace must be approved
      • Confirm your account’s access to the Marketplace has been approved by clicking the “Marketplace” tab”
      • If your account is not approved, please email with your account email to request MPX approval
    • Make sure your MDP (MoPub Demand Platform) is configured properly.
      • Confirm the account is active.
      • Confirm you have a valid segment with the OS, Ad Size and Country selected.
      • Confirm your app ID is not blacklisted or excluded from the app whitelist.
  5. How do I use the Native Manual JSON option?

    If you’d like to use Native Manual JSON instead of the Easy Form option, please ensure your JSON is in the following format:

     { "ctatext": "Install Now!", "iconimage": "http://iconimg.jpeg", "mainimage": "http://mainimg.gif", "text": "This is your text", "title": "Enter Title" }
  6. If you are having any additional issues, please email with the following information:

    • email subj: “DSP/MoPub Sample App End-to-End Test set up request”
    • MoPub UI account email
    • Link to specific ad unit for which you intend on targeting
    • Link to specific line-item that is serving the ad unit you are testing
    • Full JSON bid response that your bidder is responding back with to your test app bid requests (if applicable)

Last updated October 10, 2018

TWITTER, MOPUB, and the Bird logo are trademarks of Twitter, Inc. or its affiliates. All third party logos and trademarks included are the property of their respective owners.

© 2018 MoPub Inc.