Beginning Jan 23, 2018, Google Mobile Ads SDK versions older than 7.0.0 will no longer be supported. Publishers with these older versions will not be able to serve ads in their apps. Please ensure that you have upgraded to the latest version of the Google Mobile Ads SDK.

Integrating myTarget with Mediation

This guide is intended for publishers who want to use the Google Mobile Ads SDK to load and display ads from myTarget via mediation. It covers how to add myTarget to an ad unit's mediation configuration, and how to integrate the myTarget SDK and adapter into an Android app.

Supported formats and features

The AdMob mediation adapter for myTarget has the following capabilities:

Rewarded video
Native Advanced
Smart banners
Ad Network Optimization


  • Android SDK 4.0 (API level 14) or later
  • Google Play services 9.2.0 or later

Step 1: Set up the myTarget network

First, sign up or log in to your myTarget account. Navigate to the Apps page by clicking on APPS on the header. Add your app by clicking ADD APP.

Next, provide the Google Play URL for your app.

When adding an app, myTarget requires you to create an ad unit before you can complete the process.


Select BANNER from the available ad formats, and then click the ADD AD UNIT button.


Select INTERSTITIAL from the available ad formats, and then click the ADD AD UNIT button.

Rewarded Video

Select REWARDED VIDEO from the available ad formats, and then click the ADD AD UNIT button.


Select NATIVE from the available ad formats, and then click on ADD AD UNIT.

In your ad unit's details page, make a note of your slot ID which can be found under the ad unit settings as slot_id. This slot ID will be used to set up your AdMob ad unit in the next section.

Step 2: Configure mediation settings for your AdMob ad unit

You need to add myTarget to the mediation configuration for your ad unit. First sign in to your AdMob account.

Next, follow the instructions for either AdMob or AdMob Beta depending on which version of the AdMob UI you're using.


Navigate to the Monetize tab and select your app from the list of all your applications on the left-hand side. Click the link in the mediation column for the ad unit to which you want to add myTarget.

Next, click NEW AD NETWORK. A list of supported ad networks will be shown.

Select myTarget from the list of networks provided. Enter the slot ID obtained in the previous section and click Continue.

Enter an eCPM value for myTarget and click Continue.

AdMob Beta

Navigate to the Mediation tab. If you have an existing mediation group you'd like to modify, click the name of that mediation group to edit it, and skip ahead to Add myTarget as an ad source.

To create a new mediation group, select Create Mediation Group.

Enter your Ad Format and Platform, then click Continue.

Give your mediation group a name, and select locations to target. Next, set the mediation group status to Enabled, and then click Add Ad Units.

Associate this mediation group with one or more of your existing AdMob ad units. Then, click Done.

You should now see the ad units card populated with the ad units you selected as shown below:

Add myTarget as an ad source

In the Ad Sources card, select Add Ad Network.

Select myTarget as the ad network and enter an eCPM value. Then click Continue.

Enter the slot ID obtained in the previous section and click Done.

Using rewarded video ads

In the settings for your rewarded video ad unit, check the Override reward settings from third-party ad networks when using AdMob mediation so that you provide the same reward to the user no matter which ad network is served.

Ad unit setup screen

If you don't override the reward, the myTarget adapter defaults to a reward of type "" (empty string) with value 1.

For more information on setting reward values for AdMob ad units, see Create an ad unit.

Step 3: Import the myTarget SDK and adapter

Add the following compile dependencies with the latest versions of the myTarget SDK and adapter in the app-level build.gradle file:

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation ''
    implementation ''
    implementation ''
    implementation ''

Manual integration

Download the latest version of myTarget Android SDK and add it to your project.

Download the latest .aar file of the adapter from Bintray and add it to your project.

Step 4: Additional code required

No Additional code is required for myTarget Integration.

Step 5: Test your implementation

When testing, myTarget recommends using the slot IDs from its open source example app to request ads. These can be entered as the slot ID for your AdMob ad units for testing purposes, and then replaced with an actual slot ID when your app is ready for production.

Optional steps

Using native ads

Ad rendering

The myTarget adapter returns its native ads as either NativeAppInstallAd or NativeContentAd objects.

The myTarget adapter populates the following fields for a NativeAppInstallAd.

Field Populated by myTarget adapter
Headline Always
Image Always
Body Always
App icon Always
Call to action Always
Star rating Not guaranteed
Store Not guaranteed
Price Not guaranteed

The myTarget adapter populates the following fields for a NativeContentAd.

Field Populated by myTarget adapter
Headline Always
Image Always
Body Always
Logo Not guaranteed
Call to action Always
Advertiser Always

Impression and click tracking

The Google Mobile Ads SDK uses the myTarget SDK's callbacks for impression and click tracking, so the reports from both sources should match up with few to no discrepancies.

Send feedback about...

AdMob for Android
AdMob for Android
Need help? Visit our support page.