This guide shows you how to use the Google Mobile Ads SDK to load and display ads from AppLovin using mediation, covering both bidding and waterfall integrations. It covers how to add AppLovin to an ad unit's mediation configuration, and how to integrate the AppLovin SDK and adapter into a Unity app.
Supported integrations and ad formats
The AdMob mediation adapter for AppLovin has the following capabilities:
Integration | |
---|---|
Bidding | |
Waterfall | |
Formats | |
Banner | 1 |
Interstitial | |
Rewarded |
Banner ads (excluding MREC banners) are supported only in mediation. Bidding does not support any type of banner ads.
Requirements
- Latest Google Mobile Ads SDK
- Unity 5.6 or higher
- [For bidding]: Google Mobile Ads mediation plugin for AppLovin 4.2.0 or higher (latest version recommended)
- 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 AppLovin UI
Registrieren Sie sich oder melden Sie sich in Ihrem AppLovin-Konto an.
Zum Einrichten eines Anzeigenblocks AdMob benötigen Sie den AppLovin SDK-Schlüssel und den Berichtsschlüssel. Sie finden sie unter AppLovin-UI > Account > Keys (Schlüssel).
Wenn Sie nur Bidding einbinden möchten, können Sie mit der Konfiguration der Vermittlungseinstellungen fortfahren.
App für die Vermittlung auswählen
Gebote
Dieser Schritt ist für die Verknüpfung von Geboten nicht erforderlich.
Wasserfall
Wählen Sie auf der AppLovin-Benutzeroberfläche im Abschnitt Monetarisierung die Option Anwendungen aus, um zu Ihren registrierten Apps zu gelangen. Wählen Sie in der Liste der verfügbaren Apps die App aus, die Sie mit der Vermittlung verwenden möchten.
Zone erstellen
Gebote
Dieser Schritt ist für die Verknüpfung von Geboten nicht erforderlich.
Wasserfall
Wählen Sie auf der AppLovin-Benutzeroberfläche im Abschnitt Monetarisierung die Option Zonen aus, um Ihre registrierten Zonen-IDs aufzurufen. Wenn Sie die erforderlichen Zonen für Ihre Anwendung bereits erstellt haben, fahren Sie mit Schritt 2 fort. Klicken Sie auf Zone erstellen, um eine neue Zonen-ID zu erstellen.
Geben Sie den Namen der Zonen-ID ein, wählen Sie als Plattform Android aus und wählen Sie dann den Anzeigentyp aus.
Konfigurieren Sie die Preise für die Zone, indem Sie entweder Pauschaler CPM oder Von AppLovin optimiert auswählen. CPMs können für die Option Pauschalpreis pro Land konfiguriert werden. Klicken Sie anschließend auf Speichern.
Android
iOS
Nachdem die Zone erstellt wurde, wird die Zonen-ID in der Spalte Zonen-ID angezeigt.
Android
iOS
Testmodus aktivieren
Folgen Sie der Anleitung im MAX-Testmodus von AppLovin, um AppLovin-Testanzeigen zu aktivieren.
Step 2: Set up AppLovin demand in AdMob UI
Vermittlungseinstellungen für Anzeigenblöcke konfigurieren
Android
Eine Anleitung finden Sie in Schritt 2 der Anleitung für Android.
iOS
Eine Anleitung dazu finden Sie in Schritt 2 der Anleitung für iOS.
Add AppLovin Corp. to GDPR and US state regulations ad partners list
Folgen Sie den Schritten unter DSGVO-Einstellungen und Einstellungen zu Bestimmungen von US-Bundesstaaten um AppLovin Corp. in die Liste der Werbepartner gemäß DSGVO und US-Bundesstaaten auf der AdMob Benutzeroberfläche aufzunehmen.
Step 3: Import the AppLovin SDK and adapter
Download the latest version of Google Mobile Ads mediation plugin for AppLovin
from the download link in the
Changelog and extract the
GoogleMobileAdsAppLovinMediation.unitypackage
from the zip file.
In your Unity project editor, select Assets > Import Package > Custom
Package and find the GoogleMobileAdsAppLovinMediation.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 AppLovin 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.
Since Google Mobile Ads mediation plugin version 7.0.0, AppLovin supports reading the consent string from shared preferences and setting the consent status accordingly.If you are
not using Google Mobile Ads mediation plugin for Applovin
version 7.0.0+ or
not using a CMP that writes the consent string into the shared
preferences, you can use
AppLovin.SetHasUserConsent()
and
AppLovin.SetIsAgeRestrictedUser()
methods. The following sample code shows how
to pass consent information to the AppLovin SDK. These options must be set
before you initialize the Google Mobile Ads SDK
to ensure they get forwarded properly to the AppLovin SDK.
using GoogleMobileAds.Api.Mediation.AppLovin;
// ...
AppLovin.SetHasUserConsent(true);
Additionally, if the user is known to be in an age-restricted category, you can
also set the below flag to true
.
AppLovin.SetIsAgeRestrictedUser(true);
See AppLovin's privacy settings for more information.
US states 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 AppLovin
version 6.3.1
includes the
AppLovin.SetDoNotSell()
method. The following sample code shows how to pass
consent information to the AppLovin SDK. These options must be set before you
initialize the Google Mobile Ads
SDK
to ensure they get forwarded properly to the AppLovin SDK.
using GoogleMobileAds.Api.Mediation.AppLovin;
// ...
AppLovin.SetDoNotSell(true);
See AppLovin's Privacy documentation for more information.
Step 5: Add required code
Android
No additional code is required for AppLovin integration.
iOS
SKAdNetwork integration
Follow AppLovin's documentation to add the SKAdNetwork identifiers to your project's Info.plist` file.
Step 6: Test your implementation
Testanzeigen aktivieren
Registrieren Sie Ihr Testgerät für AdMob und aktivieren Sie den Testmodus in der AppLovin Benutzeroberfläche.
Testanzeigen überprüfen
Wenn Sie prüfen möchten, ob Sie Testanzeigen vonAppLovinerhalten, aktivieren Sie im Anzeigenprüftool mithilfe der AppLovin (Bidding) and AppLovin (Waterfall) Anzeigenquellen den Test für eine einzelne Anzeigenquelle.
Optional steps
Optimizations
Adding a call to
AppLovin.Initialize()
to your launch activity provides
AppLovin the ability to track events as soon as the app starts.
Error codes
If the adapter fails to receive an ad from AppLovin,
publishers can check the underlying error from the ad response using
ResponseInfo
under the
following classes:
Android
com.google.ads.mediation.applovin.mediation.ApplovinAdapter
com.google.ads.mediation.applovin.AppLovinMediationAdapter
iOS
GADMAdapterAppLovin
GADMAdapterAppLovinRewardBasedVideoAd
GADMediationAdapterAppLovin
Here are the codes and accompanying messages thrown by the AppLovin adapter when an ad fails to load:
Android
Error code | Reason |
---|---|
-1009 to -1, 204 | AppLovin SDK returned an error. See AppLovin's documentation for more details. |
101 | The requested ad size does not match an AppLovin supported banner size. |
103 | Context is null. |
104 | AppLovin bid token is empty. |
105 | Requested multiple ads for the same zone. AppLovin can only load 1 ad at a time per zone. |
106 | Ad is not ready to display. |
108 | AppLovin Adapter does not support the ad format being requested. |
iOS
Error code | Reason |
---|---|
-1009 to -1, 204 | AppLovin SDK returned an error. See AppLovin's documentation for more details. |
101 | The requested ad size does not match an AppLovin supported banner size. |
102 | AppLovin server parameters configured in the AdMob UI are missing/invalid. |
103 | Failed to show AppLovin ad. |
104 | Requested multiple ads for the same zone. AppLovin can only load 1 ad at a time per zone. |
105 | AppLovin SDK key not found. |
107 | Bid token is empty. |
108 | AppLovin Adapter does not support the ad format being requested. |
110 | AppLovin sent a successful load callback but loaded zero ads. |
AppLovin Unity Mediation Plugin Changelog
Version 7.3.1
- Supports AppLovin Android adapter version 12.5.0.1.
- Supports AppLovin iOS adapter version 12.5.0.0.
- Built and tested with the Google Mobile Ads Unity Plugin version 9.1.0.
Version 7.3.0
- Supports AppLovin Android adapter version 12.5.0.0.
- Supports AppLovin iOS adapter version 12.5.0.0.
- Built and tested with the Google Mobile Ads Unity Plugin version 9.1.0.
Version 7.2.2
- Supports AppLovin Android adapter version 12.4.3.0.
- Supports AppLovin iOS adapter version 12.4.2.0.
- Built and tested with the Google Mobile Ads Unity Plugin version 9.1.0.
Version 7.2.1
- Supports AppLovin Android adapter version 12.4.2.0.
- Supports AppLovin iOS adapter version 12.4.1.0.
- Built and tested with the Google Mobile Ads Unity Plugin version 9.0.0.
Version 7.2.0
- Supports AppLovin Android adapter version 12.4.0.0.
- Supports AppLovin iOS adapter version 12.4.0.0.
- Built and tested with the Google Mobile Ads Unity Plugin version 9.0.0.
Version 7.1.0
- Supports AppLovin Android adapter version 12.3.0.0.
- Supports AppLovin iOS adapter version 12.2.1.0.
- Built and tested with the Google Mobile Ads Unity Plugin version 9.0.0.
Version 7.0.1
- Plugin no longer checks for the AppLovin SDK key from the
Info.plist
and theAndroidManifest.xml
file. - Supports AppLovin Android adapter version 12.1.0.1.
- Supports AppLovin iOS adapter version 12.1.0.1.
- Built and tested with the Google Mobile Ads Unity Plugin version 8.7.0.
Version 7.0.0
- Plugin no longer checks for the AppLovin SDK key from the
Info.plist
and theAndroidManifest.xml
file. - Supports AppLovin Android adapter version 12.1.0.0.
- Supports AppLovin iOS adapter version 12.1.0.0.
- Built and tested with the Google Mobile Ads Unity Plugin version 8.6.0.
Version 6.9.1
- Supports AppLovin Android adapter version 11.11.3.0.
- Supports AppLovin iOS adapter version 11.11.3.0.
- Built and tested with the Google Mobile Ads Unity Plugin version 8.5.2.
Version 6.9.0
- Supports AppLovin Android adapter version 11.11.2.0.
- Supports AppLovin iOS adapter version 11.11.2.0.
- Built and tested with the Google Mobile Ads Unity Plugin version 8.5.2.
Version 6.8.0
- Supports AppLovin Android adapter version 11.10.1.0.
- Supports AppLovin iOS adapter version 11.10.1.0.
- Built and tested with the Google Mobile Ads Unity Plugin version 8.3.0.
Version 6.7.0
- Supports AppLovin Android adapter version 11.9.0.0.
- Supports AppLovin iOS adapter version 11.9.0.0.
- Built and tested with the Google Mobile Ads Unity Plugin version 8.1.0.
- Moved adapter content to
GoogleMobileAds/Mediation/AppLovin/
. - Refactored adapter namespace to use
GoogleMobileAds.Mediation.AppLovin
.
Version 6.6.0
- Supports AppLovin Android adapter version 11.7.1.0.
- Supports AppLovin iOS adapter version 11.7.1.0.
- Built and tested with the Google Mobile Ads Unity Plugin version 7.4.1.
Version 6.5.1
- Supports AppLovin Android adapter version 11.6.1.0.
- Supports AppLovin iOS adapter version 11.6.1.0.
- Built and tested with the Google Mobile Ads Unity Plugin version 7.3.1.
Version 6.5.0
- Supports AppLovin Android adapter version 11.6.0.0.
- Supports AppLovin iOS adapter version 11.6.0.0.
- Built and tested with the Google Mobile Ads Unity Plugin version 7.3.1.
Version 6.4.3
- Supports AppLovin Android adapter version 11.5.5.0.
- Supports AppLovin iOS adapter version 11.5.5.0.
- Built and tested with the Google Mobile Ads Unity Plugin version 7.3.1.
Version 6.4.2
- Supports AppLovin Android adapter version 11.5.4.0.
- Supports AppLovin iOS adapter version 11.5.4.0.
- Built and tested with the Google Mobile Ads Unity Plugin version 7.3.0.
Version 6.4.1
- Supports AppLovin Android adapter version 11.5.3.1.
- Supports AppLovin iOS adapter version 11.5.3.0.
- Built and tested with the Google Mobile Ads Unity Plugin version 7.3.0.
Version 6.4.0
- Supports AppLovin Android adapter version 11.5.2.0.
- Supports AppLovin iOS adapter version 11.5.1.0.
- Built and tested with the Google Mobile Ads Unity Plugin version 7.2.0.
Version 6.3.1
- Added the
AppLovin.SetDoNotSell(bool)
method to support CCPA requirements. - Supports AppLovin Android adapter version 11.4.4.0.
- Supports AppLovin iOS adapter version 11.4.3.0.
- Built and tested with the Google Mobile Ads Unity Plugin version 7.1.0.
Version 6.3.0
- Supports AppLovin Android adapter version 11.4.3.0.
- Supports AppLovin iOS adapter version 11.4.2.0.
- Built and tested with the Google Mobile Ads Unity Plugin version 7.0.2.
Version 6.2.1
- Supports AppLovin Android adapter version 11.3.3.0.
- Supports AppLovin iOS adapter version 11.3.3.0.
- Built and tested with the Google Mobile Ads Unity Plugin version 7.0.0.
Version 6.2.0
- Supports AppLovin Android adapter version 11.3.1.0.
- Supports AppLovin iOS adapter version 11.3.1.0.
- Built and tested with the Google Mobile Ads Unity Plugin version 7.0.0.
Version 6.1.0
- Supports AppLovin Android adapter version 11.2.1.0.
- Supports AppLovin iOS adapter version 11.2.1.0.
- Built and tested with the Google Mobile Ads Unity Plugin version 7.0.0.
Version 6.0.0
- Supports AppLovin Android adapter version 11.0.0.0.
- Supports AppLovin iOS adapter version 11.0.0.0.
Version 5.1.3
- Supports AppLovin Android adapter version 10.3.5.0.
- Supports AppLovin iOS adapter version 10.3.7.0.
Version 5.1.2
- Supports AppLovin Android adapter version 10.3.4.0.
- Supports AppLovin iOS adapter version 10.3.6.0.
Version 5.1.1
- Supports AppLovin Android adapter version 10.3.2.0.
- Supports AppLovin iOS adapter version 10.3.4.0.
Version 5.1.0
- Supports AppLovin Android adapter version 10.3.1.0.
- Supports AppLovin iOS adapter version 10.3.2.0.
Version 5.0.0
- Supports AppLovin Android adapter version 10.1.2.0.
- Supports AppLovin iOS adapter version 10.2.1.0.
Version 4.8.1
- Supports AppLovin Android adapter version 9.14.6.0.
- Supports AppLovin iOS adapter version 6.14.6.0.
Version 4.8.0
- Supports AppLovin Android adapter version 9.14.5.0.
- Supports AppLovin iOS adapter version 6.14.5.0.
Version 4.7.0
- Supports AppLovin Android adapter version 9.14.4.0.
- Supports AppLovin iOS adapter version 6.14.4.0.
Version 4.6.2
- Supports AppLovin Android adapter version 9.13.4.0.
- Supports AppLovin iOS adapter version 6.13.4.1.
Version 4.6.1
- Supports AppLovin Android adapter version 9.13.1.0.
- Supports AppLovin iOS adapter version 6.13.1.0.
Version 4.6.0
- Supports AppLovin Android adapter version 9.13.0.0.
- Supports AppLovin iOS adapter version 6.13.0.0.
Version 4.5.8
- Supports AppLovin Android adapter version 9.12.8.0.
- Supports AppLovin iOS adapter version 6.12.8.0.
Version 4.5.7
- Supports AppLovin Android adapter version 9.12.7.0.
- Supports AppLovin iOS adapter version 6.12.7.0.
Version 4.5.6
- Supports AppLovin Android adapter version 9.12.6.1.
- Supports AppLovin iOS adapter version 6.12.6.0.
Version 4.5.5
- Supports AppLovin Android adapter version 9.12.5.0.
- Supports AppLovin iOS adapter version 6.12.5.0.
Version 4.5.4
- Supports AppLovin Android adapter version 9.12.4.0.
- Supports AppLovin iOS adapter version 6.12.4.0.
Version 4.5.3
- Supports AppLovin Android adapter version 9.12.3.0.
- Supports AppLovin iOS adapter version 6.12.3.0.
Version 4.5.2
- Supports AppLovin Android adapter version 9.12.2.0.
- Supports AppLovin iOS adapter version 6.12.2.0.
Version 4.5.1
- Supports AppLovin Android adapter version 9.12.1.0.
- Supports AppLovin iOS adapter version 6.12.1.0.
Version 4.5.0
- Supports AppLovin Android adapter version 9.12.0.0.
- Supports AppLovin iOS adapter version 6.12.0.0.
Version 4.4.1
- Supports AppLovin Android adapter version 9.11.4.0.
- Supports AppLovin iOS adapter version 6.11.4.0.
Version 4.4.0
- Supports AppLovin Android adapter version 9.11.1.0.
- Supports AppLovin iOS adapter version 6.11.1.0.
Version 4.3.0
- Supports AppLovin Android adapter version 9.9.1.0.
- Supports AppLovin iOS adapter version 6.9.5.0.
Version 4.2.0
- Supports AppLovin Android adapter version 9.4.2.0.
- Supports AppLovin iOS adapter version 6.6.1.0.
Version 4.1.0
- Updated the plugin to support the new open-beta Rewarded API.
- Supports AppLovin Android adapter version 9.2.1.1.
- Supports AppLovin iOS adapter version 6.3.0.0.
Version 4.0.0
- Supports AppLovin Android adapter version 9.2.1.0.
- Supports AppLovin iOS adapter version 6.2.0.0.
Version 3.1.2
- Supports AppLovin Android adapter version 8.1.4.0.
- Supports AppLovin iOS adapter version 5.1.2.0.
Version 3.1.1
- Supports AppLovin Android adapter version 8.1.0.0.
- Supports AppLovin iOS adapter version 5.1.1.0.
Version 3.1.0
- Supports AppLovin Android adapter version 8.1.0.0.
- Supports AppLovin iOS adapter version 5.1.0.0.
Version 3.0.3
- Supports AppLovin Android adapter version 8.0.2.1.
- Supports AppLovin iOS adapter version 5.0.2.0.
Version 3.0.2
- Supports AppLovin Android SDK version 8.0.1.
- Supports AppLovin iOS SDK version 5.0.1.
Version 3.0.1
- Supports AppLovin Android SDK version 8.0.0.
- Supports AppLovin iOS SDK version 5.0.1.
- Added
AppLovin.SetIsAgeRestrictedUser()
method to indicate if the user is known to be in an age-restricted category.
Version 3.0.0
- Supports AppLovin Android SDK version 8.0.0.
- Supports AppLovin iOS SDK version 5.0.1.
- Added
AppLovin.SetHasUserConsent()
method to forward user consent flag to the AppLovin SDK.
Version 2.0.0
- Supports AppLovin Android SDK version 7.8.6.
- Supports AppLovin iOS SDK version 5.0.1.
Version 1.2.1
- Supports AppLovin Android SDK version 7.8.6.
- Supports AppLovin iOS SDK version 4.8.3.
Version 1.2.0
- Supports AppLovin Android SDK version 7.8.5.
- Supports AppLovin iOS SDK version 4.8.3.
Version 1.1.0
- Supports AppLovin Android SDK version 7.7.0.
- Supports AppLovin iOS SDK version 4.7.0.
Version 1.0.0
- First release!
- Supports AppLovin Android SDK version 7.4.1.
- Supports AppLovin iOS SDK version 4.4.1.