Mediate via MoPub for iOS¶
The Flurry mediation adapter for MoPub lets you integrate ads from the Flurry network, via the Flurry Advertising SDKs, while using the MoPub SDK. The adapter supports native, interstitial and banner ad units.
To mediate Flurry via MoPub for iOS, ensure that you have access to the following:
Flurry SDK 7+. See Integration Instructions.
MoPub iOS SDK, acquired from MoPub’s repository
Flurry iOS adapter for MoPub, acquired from MoPub’s repository.
A MoPub ad unit ID created on MoPub
Get Started Mediating Flurry via MoPub¶
To integrate Flurry as a Custom Native Network in the MoPub ad serving flow, you perform the following tasks:
Integrate the Flurry SDK and Flurry adapter for MoPub code into your app.
Configure Flurry’s Ad Unit(s).
Configure MoPub to mediate Flurry.
Request ads in your app.
Integrate the Flurry SDK and Flurry Adapter into Your App¶
Follow these steps:
If your app is not currently tracked by Flurry, create a new application on Flurry’s developer portal.
Keep a reference to the API Key for the new application after it has been created. Flurry requires each application to have its own unique API key to identify your app within the Flurry system. The Flurry API key is also used when configuring mediation on the MoPub dashboard.
Add the latest Flurry iOS SDK into your app.
To integrate the Flurry adapter into your application code, follow the structure advised by MoPub for 3rd party ad networks:
The adapter source files, which can be acquired from MoPub, consists of the following Flurry classes (.h and .m):
Configure Flurry Ad Unit(s)¶
Follow these steps:
For each MoPub ad unit that you want to mediate Flurry through, create a matching ad unit on the Flurry developer portal.
Log into the developer portal and navigate to the Monetization tab. On the left navigation bar select, Applications & Ad Units.
You may see a list of previously created ad units. To set up a new one, click the Ad Unit button in the upper-left corner. Depending on the type of Ad Unit you are creating, the Ad Unit setup screen has three to four modules. The Basic Setup section includes fields required to define the name, application, dimensions, placement and orientation of the ad unit.
You only need the basic setup to start. Click Save.
You are required to create your ad space on the dev portal before retrieving ads through mediation.
Mediating Flurry through MoPub requires no additional Flurry-related coding. The Flurry ad unit invocation code is already incorporated in the adapter code.
If you are integrating banner ads, and would like to simplify the impressions count reconciliation, Flurry recommends that you turn off the banner refresh in Flurry and let MoPub refresh the ads. Set the refresh rate for the ad space to an unusually high number, like 9999 (instead of the default 30 seconds). This setting is found in the Advanced Options section of the ad space setup.
Configure MoPub to Mediate Flurry¶
After you incorporate the Flurry adapter source files into your project, you need to configure Flurry as a Custom Native Network into the MoPub’s mediation flow. Follow the instructions provided by MoPub.
When adding Flurry to the mediation flow, note that you need to provide the Flurry custom event class names as noted below.
FlurryBannerCustomEventfor banner ad units
FlurryInterstitialCustomEventfor takeover ad units
FlurryNativeCustomEventfor native ad units
In the “Custom Event Class Data” column of each ad unit you are configuring to mediate Flurry, add the the Flurry API key and the name of the Flurry ad space. The parameter names are:
For example, the column would have the following value: