MoPub

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 AdTiming 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.

___10.jpg

  • 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.

 

AdTiming Platform Configuration

Ad Network

1. Enter the AdTiming 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: AdTiming 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 AdTiming platform.
        ___19.jpg

 

Add the MoPub SDK&Adapter to Your Build

Android

1. Add the MoPub SDK

  • Add to your project-level build.gradle file.
 ...
 allprojects {
   repositories {
       ...

       jcenter()
       maven {
           url "https://s3.amazonaws.com/moat-sdk-builds"
       }
    }
 }
  • Add to your application-level build.gradle file.
android {
    defaultConfig {
        minSdkVersion 19
    }
}

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

2. Add the MoPub Adapter

     AdTiming supports both Gradle dependencies and Manual download mechanisms.

       Gradle dependencies

  • Add the following in your project-level build.gradle file.
 ...
allprojects {
repositories {
...
jcenter()
maven {
url "https://dl.adtiming.com/android-sdk"
}
}
}
  • Add the following in your application-level build.gradle file.
 implementation 'com.adtiming.adapters:mopub:3.6.1@aar'

       Manual download

  • Download the MoPub Adapter from here.
  • Add the MoPub Adapter to Your Project
    Move the MoPubAdapter-x.x.x.aar to the libs folder in your Android Project.
  • Make sure you add the following to your Gradle build file under the dependencies section:
implementation (name:'MoPubAdapter-x.x.x', ext:'aar')

3. Update AndroidManifest.xml

  • Configure Android Manifest.xml to add permissions.
<!-- Required permissions -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<!-- Optional permissions. Will pass Lat/Lon values when available. Choose either Coarse or Fine -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

4. 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: proguard-rules.pro 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 com.google.android.gms.common.GooglePlayServicesUtil {*;}
-keep class com.google.android.gms.ads.identifier.AdvertisingIdClient {*;}
-keep class com.google.android.gms.ads.identifier.AdvertisingIdClient$Info {*;}

# Support for Google Play Services
# http://developer.android.com/google/play-services/setup.html
-keep class * extends java.util.ListResourceBundle {
    protected Object[][] getContents();
}

-keep public class com.google.android.gms.common.internal.safeparcel.SafeParcelable {
    public static final *** NULL;
}

-keepnames @com.google.android.gms.common.annotation.KeepName class *
-keepclassmembernames class * {
    @com.google.android.gms.common.annotation.KeepName *;
}

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

 

iOS

AdTiming supports both Cocoapods and Manualdownload mechanisms.

Cocoapods

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

pod 'mopub-ios-sdk'
Copy

Manual Download

1. Download the Mopub framework

  • you can find the lastest Mopub SDK here.

2. Add the MoPub frameworks to your Project

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

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

Comments

0 comments

Please sign in to leave a comment.