This guide shows you how to use the Google Mobile Ads SDK to load and display ads from ironSource Ads using mediation, covering waterfall integrations. It covers how to add ironSource Ads to an ad unit's mediation configuration, and how to integrate the ironSource Ads SDK and adapter into a Unity app.
Supported integrations and ad formats
The AdMob mediation adapter for ironSource Ads has the following capabilities:
Integration | |
---|---|
Bidding | 1 |
Waterfall | |
Formats | |
Banner | 2 |
Interstitial | |
Rewarded | |
Rewarded Interstitial | 2 |
1 Bidding integration is in closed beta, reach out to your account manager to request access.
2 This format is only supported in waterfall integration.
Requirements
- Latest Google Mobile Ads SDK
- Unity 4 or higher
- To deploy on Android
- Android API level 21 or higher
- To deploy on iOS
- iOS deployment target of 12.0 or higher
- A working Unity project configured with Google Mobile Ads SDK. See Get Started for details.
- Complete the mediation Get started guide
Step 1: Set up configurations in ironSource Ads UI
如需将应用添加到 ironSource Ads 信息中心,请点击 New App 按钮。
输入应用详情
选择 Live App,输入应用的 网址,然后点击 Import App Info。
如果您的应用不可用,请选择 App Not Live in the App Store 并为您的应用提供一个临时名称。选择您的平台。
填写表单的其余部分,然后点击添加应用。
记下新的应用密钥,此密钥会在添加应用后显示。在设置广告单元 ID 时,您需要使用此值。AdMob 选择您的应用支持的广告格式。然后点击继续。
Android
iOS
创建实例
接下来,为您添加的应用配置网络实例。
出价
依次前往 LevelPlay > 设置 > SDK 广告联盟,然后选择您的应用。在出价下,点击“修改”图标以查看出价实例 ID。
Android
iOS
记下实例 ID。
Android
iOS
瀑布
依次前往广告 > 设置 > 实例。选择该应用,然后点击创建实例。
输入必要的详细信息,然后点击保存并关闭。
创建实例后,实例 ID 字段中会列出实例 ID。
找到您的 Reporting API 密钥
出价
出价集成不需要执行此步骤。
瀑布
除了应用密钥和实例 ID 之外,您还需要 ironSource Ads 密钥和刷新令牌来设置您的AdMob 广告单元 ID。
在 ironSource Ads 发布商信息中心内前往我的帐号,然后点击 API 标签页。记下您的密钥和刷新令牌。
开启测试模式
请按照 ironSource Ads 的集成测试指南中的说明启用 ironSource Ads 测试广告。
Step 2: Set up ironSource Ads demand in AdMob UI
为广告单元配置中介设置
Add ironSource Mobile to GDPR and US state regulations ad partners list
按照 GDPR 设置 和 美国州级法规设置 中的步骤,将 ironSource Mobile 添加到 AdMob 界面中的 GDPR 和美国州级法规广告合作伙伴列表中。
Step 3: Import the ironSource Ads SDK and adapter
Download the latest version of Google Mobile Ads mediation plugin for ironSource
Ads from the download link in the
Changelog 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.
Then, select Assets > Play Services Resolver > Android Resolver > Force
Resolve. The Unity Play Services Resolver library will perform dependency
resolution from scratch and copy the declared dependencies into the
Assets/Plugins/Android
directory of your Unity app.
Step 4: Implement privacy settings on ironSource Ads SDK
EU Consent and GDPR
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 Google Mobile Ads mediation plugin for ironSource Ads
version 1.0.0
includes the
IronSource.SetConsent()
method. The following sample code shows how to pass
consent information to the ironSource Ads SDK. If you choose to call this
method, it is recommended that you do so prior to requesting ads through the
Google Mobile Ads SDK.
using GoogleMobileAds.Api.Mediation.IronSource;
// ...
IronSource.SetConsent(true);
See ironSource Ads's documentation on Regulation Advanced Settings for more details.
US state privacy laws
U.S. states privacy laws require giving users the right to opt out of the "sale" of their "personal information" (as the law defines those terms), with the opt-out offered via a prominent "Do Not Sell My Personal Information" link on the "selling" party's homepage. The U.S. states privacy laws compliance guide offers the ability to enable restricted data processing for Google ad serving, but Google is unable to apply this setting to each ad network in your mediation chain. Therefore, you must identify each ad network in your mediation chain that may participate in the sale of personal information and follow guidance from each of those networks to ensure compliance.
The Google Mobile Ads mediation plugin for ironSource Ads
version 2.2.4
includes the
IronSource.SetMetaData()
method. The following sample code shows how to pass
consent information to the ironSource Ads SDK. These options must be set before
you initialize the Google Mobile Ads
SDK
to ensure they get forwarded properly to the ironSource Ads SDK.
using GoogleMobileAds.Api.Mediation.IronSource;
// ...
IronSource.SetMetaData("do_not_sell", "true");
See ironSource Ads's documentation on Regulation Advanced Settings for both Android and iOS for more details and the values that can be provided in the method.
Step 5: Add required code
Android
Proguard Rules
If you shrink, obfuscate, and optimize your app, IronSource Ads requires additional ProGuard rules for your project.
When building your project, select Android as the Platform. Then,
open Player Settings and check User Proguard File under the
Publishing Settings tab. Unity should show where a custom
proguard-user.txt
file was created for you to modify.
Consult
IronSource Ads's Android SDK Integration guide
for more information on what ProGuard rules are required for your project,
and add those rules to your proguard-user.txt
file.
iOS
SKAdNetwork integration
Follow ironSource Ads's documentation to add the SKAdNetwork identifiers to your
project's Info.plist
file.
Step 6: Test your implementation
启用测试广告
请务必为AdMob 注册您的测试设备,并在 IronSource 界面中启用测试模式。
验证测试广告
如需验证您收到的是来自 IronSource 的测试广告,请使用相应广告来源在广告检查器中启用单一广告来源测试。 ironSource (Waterfall)
Error codes
If the adapter fails to receive an ad from ironSource Ads, publishers can check
the underlying error from the ad response using
ResponseInfo
under the
following classes:
Android
com.google.ads.mediation.ironsource.IronSourceAdapter
com.google.ads.mediation.ironsource.IronSourceRewardedAdapter
iOS
GADMAdapterIronSource
GADMAdapterIronSourceRewarded
Here are the codes and accompanying messages thrown by the ironSource Ads adapter when an ad fails to load:
Android
Error code | Reason |
---|---|
101 | ironSource Ads server parameters configured in the AdMob UI are missing/invalid. |
102 | ironSource Ads requires an Activity context to initialize their SDK. |
103 | ironSource Ads can only load 1 ad per ironSource instance ID. |
105 | The requested banner ad size is not supported by ironSource Ads. |
106 | ironSource Ads SDK is not initialized. |
501-1056 | ironSource Ads SDK Errors. See documentation for more details. |
iOS
Error code | Reason |
---|---|
101 | ironSource Ads server parameters configured in the AdMob UI are missing/invalid. |
102 | ironSource Ads Adapter does not support the ad format being requested. |
103 | An ironSource ad is already loaded for this network configuration. |
104 | The requested banner ad size is not supported by ironSource Ads. |
508-1037 | ironSource Ads SDK Errors. See documentation for more details. |
IronSource Unity Mediation Plugin Changelog
Version 3.2.1
- Renamed
DummyClient
toPlaceholderClient
. - Supports IronSource Android adapter version 8.2.1.0.
- Supports IronSource iOS adapter version 8.2.0.0.0.
- Built and tested with the Google Mobile Ads Unity Plugin version 9.2.0.
Version 3.2.0
- Supports IronSource Android adapter version 8.2.0.0.
- Supports IronSource iOS adapter version 8.2.0.0.0.
- Built and tested with the Google Mobile Ads Unity Plugin version 9.1.1.
Version 3.1.1
- Supports IronSource Android adapter version 8.1.0.0.
- Supports IronSource iOS adapter version 8.1.1.0.0.
- Built and tested with the Google Mobile Ads Unity Plugin version 9.1.1.
Version 3.1.0
- Supports IronSource Android adapter version 8.1.0.0.
- Supports IronSource iOS adapter version 8.1.0.0.1.
- Built and tested with the Google Mobile Ads Unity Plugin version 9.1.0.
Version 3.0.1
- Supports IronSource Android adapter version 8.0.0.1.
- Supports IronSource iOS adapter version 8.0.0.0.1.
- Built and tested with the Google Mobile Ads Unity Plugin version 9.1.0.
Version 3.0.0
- Supports IronSource Android adapter version 8.0.0.0.
- Supports IronSource iOS adapter version 8.0.0.0.0.
- Built and tested with the Google Mobile Ads Unity Plugin version 9.0.0.
Version 2.6.1
- Supports IronSource Android adapter version 7.9.0.0.
- Supports IronSource iOS adapter version 7.9.1.0.0.
- Built and tested with the Google Mobile Ads Unity Plugin version 9.0.0.
Version 2.6.0
- Supports IronSource Android adapter version 7.9.0.0.
- Supports IronSource iOS adapter version 7.9.0.0.0.
- Built and tested with the Google Mobile Ads Unity Plugin version 9.0.0.
Version 2.5.0
- Supports IronSource Android adapter version 7.6.0.0.
- Supports IronSource iOS adapter version 7.6.0.0.
- Built and tested with the Google Mobile Ads Unity Plugin version 8.6.0.
Version 2.4.0
- Supports IronSource Android adapter version 7.5.2.0.
- Supports IronSource iOS adapter version 7.5.1.0.
- Built and tested with the Google Mobile Ads Unity Plugin version 8.6.0.
Version 2.3.1
- Supports IronSource Android adapter version 7.3.1.0.
- Supports IronSource iOS adapter version 7.3.1.0.0.
- Built and tested with the Google Mobile Ads Unity Plugin version 8.3.0.
Version 2.3.0
- Moved adapter content to
GoogleMobileAds/Mediation/IronSource/
. - Refactored adapter namespace to use
GoogleMobileAds.Mediation.IronSource
. - Supports IronSource Android adapter version 7.3.0.1.0.
- Supports IronSource iOS adapter version 7.3.0.0.0.
- Built and tested with the Google Mobile Ads Unity Plugin version 8.1.0.
Version 2.2.7
- Supports IronSource Android adapter version 7.2.7.0.
- Supports IronSource iOS adapter version 7.2.7.0.1.
- Built and tested with the Google Mobile Ads Unity Plugin version 7.4.1.
Version 2.2.6
- Supports IronSource Android adapter version 7.2.6.0.
- Supports IronSource iOS adapter version 7.2.6.0.0.
- Built and tested with the Google Mobile Ads Unity Plugin version 7.3.1.
Version 2.2.5
- Supports IronSource Android adapter version 7.2.5.0.
- Supports IronSource iOS adapter version 7.2.5.1.0.
- Built and tested with the Google Mobile Ads Unity Plugin version 7.3.0.
Version 2.2.4
- Added the
IronSource.SetMetaData(string, string)
method. - Supports IronSource Android adapter version 7.2.3.1.0.
- Supports IronSource iOS adapter version 7.2.4.0.
- Built and tested with the Google Mobile Ads Unity Plugin version 7.2.0.
Version 2.2.3
- Supports IronSource Android adapter version 7.2.3.1.0.
- Supports IronSource iOS adapter version 7.2.3.1.0.
- Built and tested with the Google Mobile Ads Unity Plugin version 7.1.0.
Version 2.2.2
- Supports IronSource Android adapter version 7.2.2.1.0.
- Supports IronSource iOS adapter version 7.2.2.1.0.
- Built and tested with the Google Mobile Ads Unity Plugin version 7.0.2.
Version 2.2.1
- Supports IronSource Android adapter version 7.2.1.1.0.
- Supports IronSource iOS adapter version 7.2.1.2.0.
- Built and tested with the Google Mobile Ads Unity Plugin version 7.0.0.
Version 2.2.0
- Supports IronSource Android adapter version 7.2.1.0.
- Supports IronSource iOS adapter version 7.2.1.0.
- Built and tested with the Google Mobile Ads Unity Plugin version 7.0.0.
Version 2.1.5
- Supports IronSource Android adapter version 7.1.14.0.
- Supports IronSource iOS adapter version 7.1.14.0.
Version 2.1.4
- Supports IronSource Android adapter version 7.1.13.0.
- Supports IronSource iOS adapter version 7.1.13.0.
Version 2.1.3
- Supports IronSource Android adapter version 7.1.12.0.
- Supports IronSource iOS adapter version 7.1.12.0.
Version 2.1.2
- Supports IronSource Android adapter version 7.1.11.1.0.
- Supports IronSource iOS adapter version 7.1.11.1.0.
Version 2.1.1
- Supports IronSource Android adapter version 7.1.8.0.
- Supports IronSource iOS adapter version 7.1.8.0.
Version 2.1.0
- Supports IronSource Android adapter version 7.1.6.0.
- Supports IronSource iOS adapter version 7.1.6.1.0.
Version 2.0.3
- Supports IronSource Android adapter version 7.0.3.1.0.
- Supports IronSource iOS adapter version 7.0.3.0.
Version 2.0.2
- Supports IronSource Android adapter version 7.0.2.0.
- Supports IronSource iOS adapter version 7.0.2.0.
Version 2.0.1
- Supports IronSource Android adapter version 7.0.1.1.0.
- Supports IronSource iOS adapter version 7.0.1.0.
Version 2.0.0
- Supports IronSource Android adapter version 7.0.0.0.
- Supports IronSource iOS adapter version 7.0.0.0.
Version 1.10.0
- Supports IronSource Android adapter version 6.18.0.0.
- Supports IronSource iOS adapter version 6.18.0.0.
Version 1.9.1
- Supports IronSource Android adapter version 6.17.0.1.
- Supports IronSource iOS adapter version 6.17.0.1.0.
Version 1.9.0
- Supports IronSource Android adapter version 6.17.0.0.
- Supports IronSource iOS adapter version 6.16.3.0.
Version 1.8.2
- Supports IronSource Android adapter version 6.16.2.0.
- Supports IronSource iOS adapter version 6.16.2.0.
Version 1.8.1
- Supports IronSource Android adapter version 6.16.1.0.
- Supports IronSource iOS adapter version 6.16.1.0.
Version 1.8.0
- Supports IronSource Android adapter version 6.16.0.0.
- Supports IronSource iOS adapter version 6.16.0.0.
Version 1.7.0
- Supports IronSource Android adapter version 6.15.0.1.0.
- Supports IronSource iOS adapter version 6.15.0.1.0.
Version 1.6.0
- Supports IronSource Android adapter version 6.14.0.1.0.
- Supports IronSource iOS adapter version 6.14.0.0.
Version 1.5.0
- Supports IronSource Android adapter version 6.13.0.1.0.
- Supports IronSource iOS adapter version 6.13.1.0.0.
Version 1.4.0
- Supports IronSource Android adapter version 6.12.0.0.
- Supports IronSource iOS adapter version 6.12.0.0.
Version 1.3.2
- Supports IronSource Android adapter version 6.10.0.0.
- Supports IronSource iOS adapter version 6.8.7.0.
Version 1.3.1
- Supports IronSource Android adapter version 6.10.0.0
- Supports IronSource iOS adapter version 6.8.6.0
Version 1.3.0
- Supports IronSource Android adapter version 6.10.0.0
- Supports IronSource iOS adapter version 6.8.4.1.0
Version 1.2.0
- Supports IronSource Android adapter version 6.9.0.1
- Supports IronSource iOS adapter version 6.8.4.1.0
Version 1.1.2
- Supports IronSource Android adapter version 6.8.4.1
- Supports IronSource iOS adapter version 6.8.4.1
Version 1.1.1
- Supports IronSource Android adapter version 6.8.4.1
- Supports IronSource iOS adapter version 6.8.3.0
Version 1.1.0
- Updated the plugin to support the new open-beta Rewarded API.
- Supports IronSource Android adapter version 6.8.1.2
- Supports IronSource iOS adapter version 6.8.0.1
Version 1.0.4
- Supports IronSource Android adapter version 6.7.11.0
- Supports IronSource iOS adapter version 6.7.11.0
Version 1.0.3
- Supports IronSource Android adapter version 6.7.10.0
- Supports IronSource iOS adapter version 6.7.10.0
Version 1.0.2
- Supports IronSource Android adapter version 6.7.9.1.1
- Supports IronSource iOS adapter version 6.7.10.0
- Fixed a conflict with the Chartboost Unity mediation plugin.
Version 1.0.1
- Supports IronSource Android adapter version 6.7.9.0.
- Supports IronSource iOS adapter version 6.7.9.2.0.
Version 1.0.0
- First release!
- Supports IronSource Android adapter version 6.7.9.0.
- Supports IronSource iOS adapter version 6.7.9.1.0.