MoPub Mediation

To use HyBid SDK directly in MoPub Mediation you will need to integrate the MoPub SDK and the HyBid SDK into your app.

Integrate MoPub SDK

Download and install the MoPub iOS SDK as described in the MoPub Wiki.

Integrate HyBid SDK

To integrate the HyBid SDK follow the instruction in the integration page.

Integrate The MoPub Adapter

There are 2 ways that you can install MoPub Adapters into your application;

1. Drag & Drop Adapter Files

To use the MoPub Adapter in your project, head over to MoPub HyBid Adapters repository and import all the adapter files to your project.

Swift Integration

To use the MoPub Adapter in your Swift project, ensure that you have a Bridging Header file in your project and the Objective-C Bridging Header build setting under Swift Compiler - Code Generation has a path to the header

2. Cocoapods

If you're using CocoaPods, you can add the MoPub adapters to your project using Podfile. Check the listed repository for a detailed integration guide for MoPub HyBid adapters.

Demo App

You can find a demo app with code samples for this type of integration here.

Set Up Network on MoPub Dashboard

To set up the HyBid Adapters in the MoPub mediation you need to follow a few steps.

If you already have an app and ad units created then you can skip those parts.

Create an App

Create a new app in the MoPub Dashboard

1922

Create Leaderboard Ad Unit

Create a new ad unit and set up the format as Leaderboard (728x90)

918

After this step, you will obtain an Ad Unit Id. Use this to request ads for this placement.

617

Create Banner Ad Unit

Create a new ad unit and set up the format as Banner (320x50)

1780

After this step, you will obtain an Ad Unit Id. Use this to request ads for this placement.

1252

Create Medium Ad Unit

Create a new ad unit and set up the format as Medium (300x250)

1710

After this step, you will obtain an Ad Unit Id. Use this to request ads for this placement.

1252

Create Intersititial Ad Unit

Create a new ad unit and set up the format as Fullscreen

1654

After this step, you will obtain an Ad Unit Id. Use this to request ads for this placement.

1248

Create Native Ad Unit

Create a new ad unit and set up the format as Native

1952

After this step, you will obtain an Ad Unit Id. Use this to request ads for this placement.

1234

Create PubNative Mediation Network

Go to the Networks tab on the MoPub Dashboard. Select the option to add a new network. Select Custom SDK Network.

2030 1984 2028

On the App and Ad Unit setup section of the network creation dialog, navigate the list of app all the way to the app and ad units where you want to set up HyBid adapters.

Insert for each format the following custom event names and params:

  • Custom event for Leaderboard: HyBidMoPubMediationLeaderboardCustomEvent
  • Custom event for Banner: HyBidMoPubMediationBannerCustomEvent
  • Custom event for MRect: HyBidMoPubMediationMRectCustomEvent
  • Custom event for Interstitial: HyBidMoPubMediationInterstitialCustomEvent
  • Custom event for Rewarded: HyBidMoPubMediationRewardedAdCustomEvent
  • Custom event for Native: HyBidMoPubMediationNativeAdCustomEvent

Parameters to set up:

{
    "pn_app_token": "<YOUR PUBNATIVE APP TOKEN>",
    "pn_zone_id": "<YOUR PLACEMENT ZONE ID>"
}
1015

After setting up the network. Activate it for the app in the Segments tab in the MoPub Dashboard

Segments

568

Set up the proper floor eCPM and make sure the network is enabled for all the required Ad units.

1045

Request Ads

Ads should be requested using the regular MoPub process using the generated Ad Unit Ids. You can find the instructions in the MoPub developers page.

Initialization

Please note: to complete implementation, the HyBid SDK needs to be initialized. Follow the HyBid integration guide and complete this step.