Mediate from MoPub

The following instructions apply to publishers looking to mediate their MoPub inventory to ONE by AOL: Mobile.

Integrating with the ONE by AOL: Mobile SDK may require a "Custom Network" within MoPub using the adapters listed below.

Notice to Unity Engine developers: The AOL Mobile SDK can still deliver ads on an app developed through the Unity Engine if you are mediating through MoPub. Please follow the instructions that correspond to the MillennialSupport.unitypackage integration found on MoPub's documentation page to get started. 

Download and Add the MoPub Adapters

The most current MoPub adapter files have been released via pull requests to the MoPub git repository.

Android Files Needed:

MM Ad SDK v6.6.1
MoPub SDK v4.16.1
MoPub Upstream Adapter v1.2.0

Copy the adapter files into the directory within the project's root:

mopub-sdk/src/main/java/com/mopub/
  • mobileads/
    • MillennialBanner.java
    • MillennialInterstitial.java
    • MillennialUtils.java
  • nativeads/
    • MillennialNative.java

iOS Files Needed:

MM Ad SDK v6.6.0 
MoPub SDK v4.17.0
MoPub Upstream Adapter v1.1.0

Drag the adapter files into Xcode within the MoPub SDK directly. In the window that follows, copy items to the destination and add them to your project's main targets.

Rewarded Video

Our rewarded video adapters are still under review by the MoPub team and aren't posted in the official download repository yet. Therefore they must be downloaded separately: Android / iOS.
(For iOS, you will also need both MPMillennialRewardedVideoCustomEvent.h and MPMillennialRewardedVideoCustomEvent.m).

Rewarded videos have been tested thoroughly by the ONE by AOL: Mobile engineering team. If you have any questions or concerns reach out to your account manager or submit a request online.

 

Configure MoPub to use ONE by AOL: Mobile

MoPub, by default, allows only a single parameter: ad unit ID (formerly Millennial Media Network’s Placement ID, either APID, spot alias or position).

Using MoPub with ONE by AOL: Mobile (formerly Nexage), however, requires adding Exchange compatibility to SDK integration. Network setup in MoPub is similar to previous SDK versions. Publishers will integrate MoPub with Ad Network Support, and use the dashboard to enter their placement ID.

Choose the Networks tab at the top of the mopub.com webpage.

  1. Click the Add a Network button. If you formerly had a Nexage integration, skip this.
  2. Click the Custom Native Network link. This gives the SDK the power to invoke adapter classes and pass data to them.
  3. Name the network and use the Edit Network screen to enter the Custom Network Information. Be sure to fill in all the required fields as they are integral to making mediation work within the app.

Each of the Ad Units targeted by this custom network will require some additional information (Custom Event Class and Custom Event Class Data) which varies between iOS and Android. See the second and third columns of the table below; they represent what will be shown on the Networks tab. (The first column was deprecated by MoPub and should not be used.) 

 

Type Custom Event Class Custom Event Data
Android Banner com.mopub.mobileads.MillennialBanner {"adUnitID":"<placement ID>", "dcn":"<dcn here>", "adWidth":<width here>, "adHeight":<height here>}
Android Interstitial com.mopub.mobileads.MillennialInterstitial {"adUnitID":"<placement ID>", "dcn":"<dcn here>"}
Android Rewarded com.mopub.mobileads.MillennialRewardedVideo {"adUnitID":"<placement ID>", "dcn":"<dcn here>"}
Android Native com.mopub.nativeads.MillennialNative {"adUnitID":"<placement ID>", "dcn":"<dcn here>"}
iOS Banner MPMillennialBannerCustomEvent {"adUnitID":"<placement ID>", "dcn":"<dcn here>", "adWidth":<width here>, "adHeight":<height here>}
iOS Interstitial MPMillennialInterstitialCustomEvent {"adUnitID":"<placement ID>", "dcn":"<dcn here>"}
iOS Rewarded MPMillennialRewardedVideoCustomEvent {"adUnitID":"<placement ID>", "dcn":"<dcn here>"}
iOS Native MillennialNativeCustomEvent {"adUnitID":"<placement ID>", "dcn":"<dcn here>"}

Each JSON string in the third column represents the data (key-value pairs) that are passed into the adapter. For banners, there are four keys required:

  • adUnitID (the same as before): Representing the ad placement within the app
  • dcn (Distribution Channel Number): a site ID representing the app
  • adHeight (banners only): The height of a banner in device-independent pixels (typical values: 50, 90, or 250)
  • adWidth (banners only): The width of a banner in device-independent pixels (typical values: 320, 728, or 300)

Popular, well-supported values for width and height (in pixels) are 320x50, 480x60, 300x250 (rectangle), and 728x90 (leaderboard).
Example: {"adUnitID":"inter","dcn":"8a809417014e4ed57dceda3a2f1e0050"}

NOTE: An interstitial tag should only include adUnitID and dcn.

A Word on Native

OS-Native adapters for native ads must always be handled through a custom network. Even though it is possible to set the UI to point to ONE by AOL: Mobile, the connection will NOT correctly invoke the adapters.

Set Pricing

New placements first appear with a zero-value so the custom network won't serve to the app. Follow the steps below to set pricing and begin delivering ad units.

  1. Click the large Networks button at the top of the screen to go back to the Networks screen
  2. Click the blue link for the new network.
  3. Select Segments and Line Items, then choose the segment you wish to target with this custom network (or Global).
  4. Turn off the default filters to edit the values.
  5. Add the expected eCPM for this ad unit and it will begin delivering.

 

Have more questions? Submit a request