Create an Application in MoPub

1. Log into MoPub. On your dashboard, click the 'New App' button.___1.jpg

2. After filling in the application information, click Save & continue.___2.jpg

  • App Store or Google Play URL: If your app is already on the app store, please fill in the app address corresponding to the store.
  • My app is on the Kindle App Store or it’s unpublished: If your app is not yet on the app store, you can click this module to enter, enter the temporary app name, and select the corresponding operating system.
  • Package: Bundle ID. (Note: For mobile applications that are not published in the app store, the Bundle ID must be filled in correctly to avoid affecting the subsequent monetization effect.)
  • App Category: Correctly select the type of your mobile application to avoid affecting the subsequent realization effect.
  • COPPA Compliance: The Children's Online Privacy Protection Act, you can go to the MoPub Help Center to learn more.


Add Ad Unit

1. Select the corresponding application at the bottom of the Apps interface.___3.jpg

2. Click New ad unit.___4.jpg

3. After filling in the ad unit information, click Save.___5.jpg

  • Name: You can define your own code location name, we recommend you name it Placement ID_Ad Network Name_ Country_Floor Price. (Example: 6539_MoPub_USA_40)

  • Frequency Cap: You can set the maximum number of times a user can display an ad within an hour.

  • Server-side callback URL: Used for S2S server callback of the Rewarded Video ad unit. If you use the MoPub server to verify rewards for rewarded videos, please fill in the callback URL.

  • Ad position: used for Native ads, can set the automatic refresh time and ad unit settings

  • Native Placement: Used for Native ads, select the placement settings of native ads.

  • Refresh interval: Used for Banner ads, and can set the automatic refresh time.


MoPub ad unit optimization settings

Create Order & line item

1. Enter the Order page in the upper navigation bar and click Create Order in the upper right corner.___6.jpg

2. After filling in the order information, click Save & create line item.___7.jpg

  • Order Name: You can name it according to the corresponding ad unit to facilitate subsequent search.
  • Advertiser: If you have multiple accounts, this can help you manage Order. It is usually recommended to enter All advertiser.

  • Description: You can make a note here.

3. After filling in the relevant information of the Line item, click Next.___8.jpg

  • Order Name: Select the Order folder to which this Line item belongs.

  • Line Item Name: name your Line Item, the recommended naming format: MPX-country-priority (for example: MPX-ROW-P12)

  • Type & Priority: Select the Line Item type on the left (Line item type is Marketplace line item), and set the priority of this Line Item on the right.

          You need to fill in the payment information and add the Marketplace to the corresponding ad unit before you can choose the Marketplace line item type.

  • Budget: Generally select Unlimited goal, which is used to set advertiser budget control.

  • Rate: Set the reserve price. If you use MoPub's advertiser resources, it must be higher than this setting to fill ads.

  • Schedule: You can set the start and end time. We recommend checking start immediately. In the future, the overall waterfall will control the switch.

  • Daypart targeting: Control the time of advertising service.

  • Frequency caps: Frequency control.

4. After selecting the corresponding ad unit, click Next.___9.jpg

5. Set Audience Targeting and click Save.


  • Geo Targeting: You can set up geographic targeting in two ways: include or exclude.

  • Connectivity: Choose a specific network environment.

  • Device & OS & Targeting: Select specific device system targeting.


OpenMediation Platform Configuration

Ad Network

1. Enter the OpenMediation publisher platform, click Ad Network → click Edit behind MoPub.___11.jpg

2. After filling in the relevant information, click Save.___12.jpg

  • Currency: Select the corresponding currency unit in your MoPub report module.

  • API key & Inventory report ID: Enter the Reports module in the upper navigation bar of the MoPub platform, select View API access details, and get the API key and Inventory report ID.___13.jpg


Add Instance

1. Click Mediation → Ad unit  Add Instance.___14.jpg

2. After filling in the relevant information, click Save.___15.jpg

  • Ad Network: Select MoPub

  • Instance Name: You can define the name of your ad unit yourself, we suggest you name it: Placement ID_Ad Network Name_ Country_Floor Price.(E.g: 6539_MoPub_USA_40)

  • Unit ID:

      • Select the corresponding application at the bottom of the Apps interface.___16.jpg

      • Select the ad unit below.___17.jpg

      • Click the button on the right and select View code integration.___18.jpg 
      • Get Ad Unit ID and fill in OpenMediation platform.


Add the MoPub SDK&Adapter to Your Build


1. Add the MoPub SDK

  • Add to your application-level build.gradle file.
android {
    defaultConfig {
        minSdkVersion 19

dependencies {
implementation ('com.mopub:mopub-sdk:+@aar') {transitive = true}

2. Add the MoPub Adapter

    OpenMediation supports both Gradle dependencies and Manual download mechanisms.

       Gradle dependencies

  • Add the following in your application-level build.gradle file.
implementation 'com.openmediation.adapters:mopub:+'

       Manual download

  • Download the MoPub Adapter from here.
  • Add the MoPub Adapter to Your Project.

3. For Proguard Users Only
If you are using ProGuard with the MoPub adapter, you must add the following code to your ProGuard configuration (Android Studio: or Eclipse: proguard-project.txt):

# Keep public classes and methods.
-keepclassmembers class com.mopub.** { public *; }
-keep public class com.mopub.**
-keep public class android.webkit.JavascriptInterface {}

# Explicitly keep any BaseAd and CustomEventNative classes in any package.
-keep class * extends com.mopub.mobileads.BaseAd {}
-keep class * extends com.mopub.nativeads.CustomEventNative {}

# Keep methods that are accessed via reflection
-keepclassmembers class ** { @com.mopub.common.util.ReflectionTarget *; }

# Support for Android Advertiser ID.
-keep class {*;}
-keep class {*;}
-keep class$Info {*;}

# Support for Google Play Services
-keep class * extends java.util.ListResourceBundle {
    protected Object[][] getContents();

-keep public class {
    public static final *** NULL;

-keepnames class *
-keepclassmembernames class * { *;

-keepnames class * implements android.os.Parcelable {
    public static final ** CREATOR;



OpenMediation supports both Cocoapods and Manualdownload mechanisms.


To Integrate the MoPub SDK with Cocoapods, enter the following line in your podfile and you are good to go!

pod 'mopub-ios-sdk'

Manual Download

1. Download the Mopub framework

  • you can find the lastest Mopub SDK here.

2. Add the MoPub frameworks to your Project

You are now all set to deliver MoPub Ads within your application.

Was this article helpful?
0 out of 0 found this helpful



Article is closed for comments.