Unity AdMob Mediation Custom Adapter

MobileFuse provides an AdMob Mediation custom adapter for Interstitial and Banner ads.

Step 1. Configure MobileFuse in the AdMob publisher console

In the AdMob publisher console, select Mediation. In the Mediation Groups table, click “Create Mediation Group”, or select an existing group to edit.

Create a new mediation group - or edit an existing one from the list

If you’re creating a new mediation group, select the appropriate format, and select Android as the platform. On the next page, give the mediation group a sensible name, and add the ad units that you want to use. If you are editing an existing group, skip this step:

Once your mediation group is configured, look for the “Waterfall” section and click “Add Custom Event

This allows you to add our custom adapter into your waterfall. Give it an appropriate name for your placement and set the average CPM that you expect to receive:

Click Continue, then configure the MobileFuse custom adapter. The following settings should be used:

If you are configuring a Banner unit:

Class Name

com.google.ads.mediation.mobilefuse.MobileFuseBanner

Parameter

{ "appKey": "XXXX_XXXXX", "placementId": "XXXXXX" } - NOTE: The values marked with X will be supplied to you by MobileFuse

If you are configuring an Interstitial unit:

Class Name

com.google.ads.mediation.mobilefuse.MobileFuseInterstitial

Parameter

{ "appKey": "XXXX_XXXXX", "placementId": "XXXXXX" } - NOTE: The values marked with X will be supplied to you by MobileFuse

 

Note: Even though parameter is marked as optional in the console, it is required for the MobileFuse custom adapter.

 

After filling out the above information, press “Done”, and ensure that MobileFuse is now visible in the list of networks:

Save the waterfall and ensure that it’s set to active.

Step 2. Install the MobileFuse AdMob Mediation Adapter

Gradle Setup

1- Ensure that mavenCentral is included in your settings.gradle file:

repositories { // [... other project repos] mavenCentral() }

2- Update your app module’s dependencies to include the MobileFuse AdMob Adapter:

dependencies { // [... other project dependencies] implementation 'com.mobilefuse.sdk:mobilefuse-adapter-admob:1.0.0.0' }

Step 3. Configure Data Privacy

The only other configuration that you may want to set up is data privacy. You should call the MobileFuse.setPrivacyPreferences() method as soon as possible after your app launches, or when the users privacy preferences change. This will allow you to supply an IAB consent string or US privacy string that will be passed through to MobileFuse: