Integrating IronSource with Mediation

This guide is intended for publishers who want to use the Google Mobile Ads SDK to load and display ads from IronSource via mediation. It covers adding IronSource to an ad unit's mediation configuration, setting up Ad Network Optimization (ANO), and integrating the IronSource SDK and adapter into a Unity app.

Supported ad formats and features

The AdMob mediation adapter for IronSource has the following capabilities:

Formats
Banners
Interstitials
Rewarded Video
Features
Smart Banners
Ad Network Optimization (ANO)

Requirements

  • Unity 4 or higher
  • To deploy on Android
    • Android SDK 4.0 (API level 14) or later
    • Google Play services 9.2.0 or later
  • To deploy on iOS
    • Xcode 7.0 or higher
    • iOS Deployment target of 7.0 or higher
    • Minimum required Google Mobile Ads SDK 7.14.0 or higher
  • A working Unity project configured with Google Mobile Ads SDK. See the Getting Started guide for details.

Step 1: Set up IronSource

Sign up and sign in to your IronSource account. To add your application to the IronSource dashboard, click on the New App button.

If your app supports both Android and iOS platforms, you need to add each of them separately.

Enter App Details

Android

Select Mobile App, enter the Google Play URL of your app, and click Import App Info. Once your app information is displayed, click the Add App button.

If your app is not available in Google Play, select App Not Live in the Application Store and provide a Temporary Name for your app. Select Android as platform and click on Add App.

IronSource app details

Take note of the App Key listed on this page. You will need this value for setting up your Admob Ad Unit ID. Select the Ad formats your app supports by selecting the appropriate Live tabs.

Then click "Done".

IronSource android app key

iOS

Select Mobile App, enter the App Store URL of your app, and click Import App Info. Once your app information is displayed, click the Add App button.

If your app is not available in the App Store, select App Not Live in the Application Store and provide a Temporary Name for your app. Select iOS as platform and click on Add App.

IronSource app details

Take note of the App Key listed on this page. You will need this value for setting up your Admob Ad Unit ID. Select the Ad formats your app supports by selecting the appropriate Live tabs.

Then click "Done".

IronSource ios app key

Instance ID

Next, configure a network instance for the app you added. IronSource supports multiple network instances for Rewarded Videos and Interstitials.

Navigate to the Ad Units & Placements page from the left nav, select your app in the APPLICATIONS list, and click on the Edit button.

Android

IronSource edit instance

iOS

IronSource edit instance

Select the Add Network Instance link, enter the Instance Name, and click on Save.

Android

IronSource add network instance

iOS

IronSource add network instance

Once the instance is created, the Instance Id is listed in the 'Instance Id' field.

Android

IronSource instance id

iOS

IronSource instance id

In addition to the App Key and Instance ID, you need your IronSource User Name and Secret Key to set up your AdMob ad unit ID. Navigate to My Account in your IronSource publisher dashboard to locate your User Name.

Then click on the Reporting API tab.

IronSource reporting api

Take note of your Secret Key.

IronSource secret key

Step 2: Configure AdMob Ad Unit

To add IronSource to the mediation configuration for your AdMob ad unit(s), first sign in to your AdMob account. Then, follow the iOS or Android platform specific instructions below.

If you're deploying your Unity app to both Android and iOS, you need two AdMob ad units, one for each platform.

AdMob UI Android

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 IronSource 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 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 IronSource as an ad source

In the Ad Sources card, select Add Ad Network. Then select IronSource.

Next, enable the Optimize feature, then enter the User Name  and Secret Key obtained in previous section to set up ANO for IronSource. Then enter an eCPM value and click Continue.

Enter the App Key and Instance ID obtained in the previous section.

AdMob UI iOS

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 IronSource 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 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 IronSource as an ad source

In the Ad Sources card, select Add Ad Network. Then select IronSource.

Next, enable the Optimize feature, then enter the User Name  and Secret Key obtained in previous section to set up ANO for IronSource. Then enter an eCPM value and click Continue.

Enter the App Key and Instance ID obtained in the previous section.

Using rewarded video ads

In the settings for your rewarded video ad unit, check the Apply to all networks in Mediation groups box so that you provide the same reward to the user no matter which ad network is served.

If you don't check this setting, the IronSource adapter passes back the reward specified in the IronSource dashboard when creating the placement.

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

Step 3: Import the IronSource SDK and adapter

Download the latest version of Google Mobile Ads mediation plugin for IronSource and extract the GoogleMobileAdsIronSourceMediation.unitypackage from the zip file.

In your Unity project editor, select Assets > Import Package > Custom Package and find the GoogleMobileAdsIronSourceMediation.unitypackage file you downloaded. Make sure that all the files are selected and click Import.

Step 4: Additional code required

No additional code is required for IronSource Unity integration.

Step 5: Test your implementation

Android

To enable test ads on IronSource, run your ads integrated app and check the logs for a message that looks like this:

Copy your GAID (which is your device's Advertising ID) to your clipboard.

Navigate to the MONETIZE tab and click the Testing button. Next, click the New Test Device button.

Enter the Device Name and Advertising ID (from the previous step). Then click Save.

The newly added test device is listed under TEST DEVICES. You can activate or deactivate Test Ads in this module as required.

iOS

To enable test ads on IronSource, run your ads integrated app and check the logs for a message that looks like this:

This is the Advertising ID of your test device. Copy it to the clipboard.

Navigate to the MONETIZE tab and click the Testing button. Next, click the New Test Device button.

Enter the Device Name and Advertising ID (from the previous step). Then click Save.

The newly added test device is listed under TEST DEVICES. You can activate or deactivate Test Ads in this module as required.

Optional Steps

Under the Google EU User Consent Policy, you must ensure that certain disclosures are given to, and consents obtained from, users in the European Economic Area (EEA) regarding the use of device identifiers and personal data. This policy reflects the requirements of the EU ePrivacy Directive and the General Data Protection Regulation (GDPR). When seeking consent, you must identify each ad network in your mediation chain that may collect, receive, or use personal data and provide information about each network's use. Google currently is unable to pass the user's consent choice to such networks automatically.

The section below shows you how to enable or disable personalized ads for IronSource.

The Google Mobile Ads mediation plugin for IronSource version 1.0.0 includes the IronSource.SetConsent() method. The following sample code shows how to pass consent information to the IronSource SDK. If you choose to call this method, it is recommended that you do so prior to requesting ads via the Google Mobile Ads SDK.

using GoogleMobileAds.Api.Mediation.IronSource;
// ...

IronSource.SetConsent(true);

See IronSource's GDPR documentation for more information.

Send feedback about...

Google AdMob > Mobile Ads SDK > Unity
Google AdMob > Mobile Ads SDK > Unity
Need help? Visit our support page.