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 Flutter 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
- Flutter 3.7.0 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 Flutter 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
Sign up and sign in to your ironSource Ads account.
To add your application to the ironSource Ads dashboard, click the New App button.
Enter app details
Select Live App, enter the of your app, and click Import App Info.
If your app is not available, select App Not Live in the Application Store and provide a Temporary Name for your app. Select your platform.
Fill out the rest of the form and click Add App.
Take note of your new App Key, which is displayed after the app has been added. You will need this value for setting up your AdMob ad unit ID. Select the ad formats your app supports. Then click Continue.
Android
iOS
Create instance
Next, configure a network instance for the app you added.
Bidding
Navigate to LevelPlay > Setup > SDK networks, then select your app. Under Bidding, click the edit icon to view the bidding instance ID.
Android
iOS
Take note of the Instance ID.
Android
iOS
Waterfall
Navigate to Ads > Setup > Instances. Select the app and click Create Instance.
Enter the necessary details and click Save and close.
Once the instance is created, the Instance ID is listed in the Instance ID field.
Locate your Reporting API Key
Bidding
This step isn't required for bidding integrations.
Waterfall
In addition to the App Key and Instance ID, you'll also need your ironSource Ads Secret Key and Refresh Token to set up your AdMob ad unit ID.
Navigate to My Account in your ironSource Ads publisher dashboard then click the API tab. Take note of your Secret Key and Refresh Token.
Turn on test mode
Follow the instructions in ironSource Ads's Integration testing guide on how to enable ironSource Ads test ads.
Step 2: Set up ironSource Ads demand in AdMob UI
광고 단위에 대한 미디에이션 설정 구성
Add ironSource Mobile to GDPR and US state regulations ad partners list
Step 3: Import the ironSource Ads SDK and adapter
pub.dev를 통한 통합
(Android만 해당) 다음 저장소를 내부의 build.gradle
파일에 추가합니다.
프로젝트의 android
디렉터리에 있습니다.
repositories {
google()
mavenCentral()
maven {
url = uri("https://android-sdk.is.com/")
}
}
다음 종속 항목을 최신 버전의
IronSource
패키지에 있는 SDK 및 어댑터
pubspec.yaml
파일:
dependencies:
gma_mediation_ironsource: ^1.0.0
수동 통합
Google 모바일 광고 미디에이션 플러그인 최신 버전 다운로드
IronSource
,
다운로드한 파일을 추출하고 추출된 플러그인 폴더를 추가합니다.
(및 그 콘텐츠를) Flutter 프로젝트에 추가합니다. 그런 다음 다음 종속 항목을 추가하여 pubspec.yaml
파일에서 플러그인을 참조합니다.
dependencies:
gma_mediation_ironsource:
path: path/to/local/package
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
includes the
GmaMediationIronsource().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.
import 'package:gma_mediation_ironsource/gma_mediation_ironsource.dart';
// ...
GmaMediationIronsource().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
includes the
GmaMediationIronsource().setDoNotSell
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.
import 'package:gma_mediation_ironsource/gma_mediation_ironsource.dart';
// ...
GmaMediationIronsource().setDoNotSell(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.
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.
Application lifecycle
Override the onPause()
and onResume()
methods in each of
your activities to call the corresponding ironSource Ads methods as follows:
Java
@Override
public void onResume() {
super.onResume();
IronSource.onResume(this);
}
@Override
public void onPause() {
super.onPause();
IronSource.onPause(this);
}
Kotlin
public override fun onResume() {
super.onResume()
IronSource.onResume(this)
}
public override fun onPause() {
super.onPause()
IronSource.onPause(this)
}
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 UI에서 테스트 모드를 사용 설정해야 합니다.
테스트 광고 확인
IronSource 에서 테스트 광고를 수신하고 있는지 확인하려면 광고 검사기에서 ironSource Ads (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 Flutter Mediation Adapter Changelog
1.1.0
- Verified compatibility with ironSource Android adapter version 8.2.1.0
- Verified compatibility with ironSource iOS adapter version 8.2.0.0.0
- Built and tested with the Google Mobile Ads Flutter Plugin version 5.1.0.
1.0.0
- Initial release.
- Verified compatibility with ironSource Android adapter version 8.0.0.0
- Verified compatibility with ironSource iOS adapter version 8.0.0.0.0
- Built and tested with the Google Mobile Ads Flutter Plugin version 5.1.0.