Integrating AppLovin with Mediation

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

Supported ad formats and features

The AdMob mediation adapter for AppLovin has the following capabilities:

Formats
Banners
Interstitials
Rewarded Video
Rewarded Video (new APIs)
Native Ads
Features
Smart Banners
Ad Network Optimization (ANO)
Open Bidding 1
1 AppLovin does not support Open Bidding for native ads.

Requirements

  • iOS deployment target of 9.0 or higher
  • [For Open Bidding]: AppLovin adapter 6.3.0.0 or higher (latest version recommended)
  • Latest Google Mobile Ads SDK

Step 1: Set up AppLovin

Sign up or log in to your AppLovin account.

To set up your AdMob ad unit, you'll need your AppLovin SDK Key and Report Key. To find them, go to the AppLovin Dashboard and click on the Account tab. In the dropdown list under Account, select Keys to see both values.

[Waterfall only] Select app for mediation

On the AppLovin dashboard, select Applications under the Monetization section to get to your registered apps. Select the app you'd like to use with mediation from the list of available apps.

[Waterfall only] Create Zone

On the AppLovin dashboard, select Zones under the Monetization section to get to your registered Zone IDs. If you have already created the required Zones for your app, skip ahead to Step 2. To create a new Zone ID, click Create Zone.

Enter the name of Zone ID , select iOS as the Platform, and desired Ad Type.

For Pricing, select either Flat CPM with the drop-down to select specific countries for CPM zones or Optimized by AppLovin for non CPM Zones. Then, click Save.

Once the Zone is created, the Zone ID can be found under the Zone ID column.

Step 2: Configure mediation settings for your AdMob ad unit

You need to add AppLovin to the mediation configuration for your ad unit.

First, sign in to your AdMob account. Next, 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 AppLovin 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:

Add AppLovin as an ad source

Waterfall

In the Ad Sources card, select Add Ad Network.

Select AppLovin and enable the Optimize switch. Enter the Report Key obtained in the previous section to set up ANO for AppLovin. Then enter an eCPM value for AppLovin and click Continue.

Enter the Bundle ID of your app along with the Zone ID and the SDK Key obtained in the previous section.

Open Bidding

In the Ad Sources card, select Add Ad Network. Select AppLovin (Open Bidding). Then, enter the SDK Key obtained in the earlier section.

Using rewarded video ads

In the settings for your rewarded video ad unit, provide values for the reward amount and reward type. Then, to ensure you provide the same reward to the user no matter which ad network is served, check the Apply to all networks in Mediation groups box.

If you don't apply this setting, the AppLovin adapter passes back the reward specified in the AppLovin 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 AppLovin SDK and adapter

  • Add the following line to your project's Podfile:

    pod 'GoogleMobileAdsMediationAppLovin'
    
  • From the command line run:

    pod install --repo-update

Manual integration

  • Download the latest version of the AppLovin iOS SDK and link ApplovinSDK.framework in your project.

  • Download the latest version of the ApplovinAdapter and link ApplovinAdapter.framework in your project.

  • Add the following frameworks to your project:

    • AdSupport
    • AVFoundation
    • CoreGraphics
    • CoreMedia
    • CoreTelephony
    • StoreKit
    • SystemConfiguration
    • UIKit
    • WebKit (NEW)
    • libz.tbd (NEW)

Step 4: Additional code required

No additional code required for AppLovin integration.

Step 5: Test your implementation

AppLovin recommends that test ads should be used during development if you cannot get live ads.

To enable test ads, go to the Manage Apps page by clicking on your app's name in the AppLovin dashboard and navigate to the Test Mode section. Toggle the Test Mode switch to ON.

Test Mode may take up to 30 mins to take effect. It will also automatically reset to OFF after two hours.

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 AppLovin.

In SDK version 5.0.1, AppLovin added the setHasUserContent and setIsAgeRestrictedUser methods. The following sample code shows how to pass consent information to the AppLovin SDK. It is recommended that you call these methods prior to requesting ads via the Google Mobile Ads SDK.

Swift

import AppLovinSDK
// ...

ALPrivacySettings.setHasUserConsent(true)

Objective-C

#import <AppLovinSDK/AppLovinSDK.h>
// ...

[ALPrivacySettings setHasUserConsent:YES];

Additionally, if the user is known to be in an age-restricted category, you can set the following flag to YES.

Swift

import AppLovinSDK
// ...

ALPrivacySettings.setIsAgeRestrictedUser(true)

Objective-C

#import <AppLovinSDK/AppLovinSDK.h>
// ...

[ALPrivacySettings setIsAgeRestrictedUser:YES];

See AppLovin's privacy settings for more details.

Network-specific parameters

The AppLovin adapter supports muteAudio, an optional extra to disable audio on video ads. This parameter can be passed to the adapter using the GADMAdapterAppLovinExtras class and must be set on every ad request. Here's how to set it:

Swift

let request = GADRequest()
let extras = GADMAdapterAppLovinExtras()
extras.muteAudio = false
request.register(extras)

Objective-C

GADRequest *request = [GADRequest request];
GADMAdapterAppLovinExtras * extras = [[GADMAdapterAppLovinExtras alloc] init];
extras.muteAudio = NO;
[request registerAdNetworkExtras:extras];

Optimizations

Initializing the AppLovin SDK as soon as your application launches provides AppLovin the ability to track events as soon as the app starts.

Swift

let sdk = ALSdk.shared(withKey: "sdkKey")
sdk?.initializeSdk()

Objective-C

ALSdk *sdk = [ALSdk sharedWithKey:@"sdkKey"];
[sdk initializeSdk];

AppLovin iOS Mediation Adapter Changelog

Version 6.13.4.0

  • Verified compatibility with AppLovin SDK 6.13.4.
  • Now requires Google Mobile Ads SDK version 7.66.0 or higher.

Built and tested with:

  • Google Mobile Ads SDK version 7.66.0.
  • AppLovin SDK version 6.13.4.

Version 6.14.3.0

  • Verified compatibility with AppLovin SDK 6.14.3.

Built and tested with:

  • Google Mobile Ads SDK version 7.65.0.
  • AppLovin SDK version 6.14.3.

Version 6.14.2.0

  • Verified compatibility with AppLovin SDK 6.14.2.

Built and tested with:

  • Google Mobile Ads SDK version 7.65.0.
  • AppLovin SDK version 6.14.2.

Version 6.13.4.1

  • Now requires Google Mobile Ads SDK version 7.65.0 or higher.
  • Removed support for 300x250 medium rectangle ads and native ads.

Built and tested with:

  • Google Mobile Ads SDK version 7.65.0.
  • AppLovin SDK version 6.13.4.

Version 6.13.4.0

  • Verified compatibility with AppLovin SDK 6.13.4.

Built and tested with:

  • Google Mobile Ads SDK version 7.64.0.
  • AppLovin SDK version 6.13.4.

Version 6.13.1.0

  • Verified compatibility with AppLovin SDK 6.13.1.
  • Now requires Google Mobile Ads SDK version 7.64.0 or higher.
  • Removed 728x90 as a supported format for iPhone devices.

Built and tested with:

  • Google Mobile Ads SDK version 7.64.0.
  • AppLovin SDK version 6.13.1.

Version 6.13.0.0

  • Verified compatibility with AppLovin SDK 6.13.0.
  • Now requires Google Mobile Ads SDK version 7.61.0 or higher.
  • Removed 728x90 as a supported format for iPhone devices.

Built and tested with:

  • Google Mobile Ads SDK version 7.61.0.
  • AppLovin SDK version 6.13.0.

Version 6.12.8.0

  • Verified compatibility with AppLovin SDK 6.12.8.

Built and tested with:

  • Google Mobile Ads SDK version 7.60.0.
  • AppLovin SDK version 6.12.8.

Version 6.12.7.0

  • Verified compatibility with AppLovin SDK 6.12.7.
  • Now requires Google Mobile Ads SDK version 7.60.0 or higher.

Built and tested with:

  • Google Mobile Ads SDK version 7.60.0.
  • AppLovin SDK version 6.12.7.

Version 6.12.6.0

  • Verified compatibility with AppLovin SDK 6.12.6.

Built and tested with:

  • Google Mobile Ads SDK version 7.59.0.
  • AppLovin SDK version 6.12.6.

Version 6.12.5.0

  • Verified compatibility with AppLovin SDK 6.12.5.
  • Updated the minimum required Google Mobile Ads SDK version to 7.59.0.

Built and tested with:

  • Google Mobile Ads SDK version 7.59.0.
  • AppLovin SDK version 6.12.5.

Version 6.12.4.0

  • Verified compatibility with AppLovin SDK 6.12.4.

Built and tested with:

  • Google Mobile Ads SDK version 7.58.0.
  • AppLovin SDK version 6.12.4.

Version 6.12.3.0

  • Verified compatibility with AppLovin SDK 6.12.3.

Built and tested with:

  • Google Mobile Ads SDK version 7.58.0.
  • AppLovin SDK version 6.12.3.

Version 6.12.2.0

  • Verified compatibility with AppLovin SDK 6.12.2.

Built and tested with:

  • Google Mobile Ads SDK version 7.58.0.
  • AppLovin SDK version 6.12.2.

Version 6.12.1.0

  • Verified compatibility with AppLovin SDK 6.12.1.

Built and tested with:

  • Google Mobile Ads SDK version 7.58.0.
  • AppLovin SDK version 6.12.1.

Version 6.12.0.0

  • Verified compatibility with AppLovin SDK 6.12.0.
  • Added standardized adapter error codes and messages.

Built and tested with:

  • Google Mobile Ads SDK version 7.58.0.
  • AppLovin SDK version 6.12.0.

Version 6.11.5.0

  • Verified compatibility with AppLovin SDK 6.11.5.
  • Removed support for the i386 architecture.

Built and tested with:

  • Google Mobile Ads SDK version 7.56.0.
  • AppLovin SDK version 6.11.5.

Version 6.11.4.0

  • Verified compatibility with AppLovin SDK 6.11.4.

Built and tested with:

  • Google Mobile Ads SDK version 7.55.1.
  • AppLovin SDK version 6.11.4.

Version 6.11.3.0

  • Verified compatibility with AppLovin SDK 6.11.3.

Built and tested with:

  • Google Mobile Ads SDK version 7.55.0.
  • AppLovin SDK version 6.11.3.

Version 6.11.1.0

  • Verified compatibility with AppLovin SDK 6.11.1.
  • Fixed an issue that caused native ads to fail to load.

Built and tested with:

  • Google Mobile Ads SDK version 7.53.1.
  • AppLovin SDK version 6.11.1.

Version 6.10.1.0

  • Verified compatibility with AppLovin SDK 6.10.1.

Built and tested with:

  • Google Mobile Ads SDK version 7.52.0.
  • AppLovin SDK version 6.10.1.

Version 6.9.5.0

  • Verified compatibility with AppLovin SDK 6.9.5.

Built and tested with:

  • Google Mobile Ads SDK version 7.50.0.
  • AppLovin SDK version 6.9.5.

Version 6.9.4.0

  • Verified compatibility with AppLovin SDK 6.9.4.
  • Fix RTB rewarded videos not being able to show even if loaded.
  • Fix adapter disallowing future ad loads of a previously-loaded zone that has been timed out by AdMob or not shown by the publisher.
  • Fix native ads not working when passing SDK key from server.
  • Validate SDK key from server, then fallback to Info.plist if server’s SDK key is invalid (e.g. in case of placeholder values being sent down).
  • Validate custom zone IDs from server (e.g. in case of placeholder values being sent down).
  • Remove placements API.

Built and tested with:

  • Google Mobile Ads SDK version 7.50.0.
  • AppLovin SDK version 6.9.4.

Version 6.8.0.0

  • Verified compatibility with AppLovin SDK 6.8.0.
  • Removed support for Native App Install ad requests. Apps must use the Unified Native Ads API to request native ads.
  • Now requires Google Mobile Ads SDK version 7.46.0 or higher.

Version 6.6.1.0

  • Verified compatibility with AppLovin SDK 6.6.1.
  • Fixed a crash caused by calling a completionHandler on a nil object.
  • Updated the adapter to handle multiple interstitial requests.
  • Added support for flexible banner ad sizes.

Version 6.3.0.0

  • Verified compatibility with AppLovin SDK 6.3.0.
  • Updated the adapter to use the new rewarded API.
  • Now requires Google Mobile Ads SDK version 7.41.0 or higher.

Version 6.2.0.0

  • Verified compatibility with AppLovin SDK 6.2.0.

Version 6.1.4.0

  • Verified compatibility with AppLovin SDK 6.1.4.

Version 5.1.2.0

  • Verified compatibility with AppLovin SDK 5.1.2.

Version 5.1.1.0

  • Verified compatibility with AppLovin SDK 5.1.1.

Version 5.1.0.0

  • Verified compatibility with AppLovin SDK 5.1.0.

Version 5.0.2.0

  • Verified compatibility with AppLovin SDK 5.0.2.

Version 5.0.1.1

  • Add support for native ads.
  • Set AdMob as mediation provider on the AppLovin SDK.

Version 5.0.1.0

  • Verified compatibility with Applovin SDK 5.0.1.

Version 4.8.4.0

  • Verified compatibility with Applovin SDK 4.8.4.

Version 4.8.3.0

  • Add support for zones and smart banners.

Version 4.7.0.0

  • Verified compatibility with AppLovin SDK 4.7.0.

Version 4.6.1.0

  • Verified compatibility with AppLovin SDK 4.6.1.

Version 4.6.0.0

  • Verified compatibility with AppLovin SDK 4.6.0.

Version 4.5.1.0

  • Verified compatibility with AppLovin SDK 4.5.1.

Version 4.4.1.1

  • Added support for banner ads.

Version 4.4.1.0

  • Verified compatibility with AppLovin SDK 4.4.1.

Version 4.3.1.0

  • Added support for interstitial ads.

Earlier versions

  • Added support for rewarded video ads.