When you integrate third-party SDKs into your Mobile Property, you are solely responsible for such integrations. You and the third-party SDK provider must ensure compliant data processing and treatment of any user-based or device-based privacy choices or flags.
This page shows you how to integrate MAX mediation network adapters in your app. Choose which mediated ad networks you want to integrate by checking the boxes below. Then this page will display instructions specific to those networks.
Select the ad networks you want to integrate. Then follow the Android-specific instructions on this page.
Developers and publishers who use Google AdSense, AdManager, or AdMob must use a consent management platform (CMP) that Google certifies. The CMP must integrate with IAB’s Transparency and Consent Framework when you serve ads to users in the European Economic Area (EEA) or the UK. See Privacy: “TCF v2 consent” for more information.

Google AdMob requires Android Gradle plugin version 4.2.0 or higher and Gradle version 6.7.1 or higher. If you see the following error, update your Android Gradle plugin and Gradle versions:
AAPT: error: unexpected element <property> found in <manifest><application>.
To update your Android Gradle plugin and Gradle versions, take the following steps:

Assets/Plugins/Android/baseProjectTemplate.gradle file.
Set the dependencies to use Gradle build tools version 4.2.0:
allprojects {
buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
«build script dependencies»
}
}
}

If your project uses the Meta Audience Network Unity SDK, you must be on version 11.0 or later for the MAX Meta Audience Network adapter to function.
To migrate from an older version of Meta Audience Network Unity SDK, delete the Assets/FacebookSDK directory, then download and re-import the latest version here.
If you aren’t using the Meta Audience Network Unity Plugin, follow the instructions here under “Unity SDK, v5.10+ (not using the Audience Network-supplied Unity wrapper)” to add a wrapper for the relevant methods.
If you do not want to enable Limited Data Use (LDU) mode, pass SetDataProcessingOptions() an empty string array:
using AudienceNetwork;
⋮
AdSettings.SetDataProcessingOptions(new string[] { });
⋮
// Initialize MAX SDK
If you want to enable LDU for users and to specify user geography, call SetDataProcessingOptions() like this:
using AudienceNetwork;
⋮
AdSettings.SetDataProcessingOptions(new string[] {"LDU"}, «country», «state»);
⋮
// Initialize MAX SDK
If you use Google UMP as your CMP, you can determine whether the user consented to Meta. To do so, use the following code:
bool? hasMetaConsent = MaxSdkUtils.GetAdditionalConsentStatus(89);
if ( hasMetaConsent != null )
{
// Set Meta Data Processing Options accordingly.
}
else
{
// AC String is not available on disk. Please check for consent status after the user completes the CMP flow.
}
To learn how to implement Meta Audience Network’s “Limited Data Use” flag in California, read the Meta for Developers documentation.
Some network SDKs include the <queries> element in their bundled Android Manifest files.
If you use an incompatible version of the Android Gradle plugin, this causes one of the following build errors:
com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
error: unexpected element <queries> found in <manifest>.
Missing 'package' key attribute on element package at [:com.my.target.mytarget-sdk-5.11.3:]
AndroidManifest Validation failed
To fix this error, upgrade to one of the following versions of the Android Gradle plugin.
These versions support the <queries> element:
Upgrade the Android Gradle Plugin, not the Gradle Build Tools.
| Current Android Gradle plugin version | Version that supports <queries> element |
|---|---|
| 4.1.* | All |
| 4.0.* | 4.0.1+ |
| 3.6.* | 3.6.4+ |
| 3.5.* | 3.5.4+ |
| 3.4.* | 3.4.3+ |
| 3.3.* | 3.3.3+ |
To update the Gradle Plugin version to a compatible one, enable the custom base Gradle template:
The template is Assets/Plugins/Android/mainTemplate.gradle for Unity 2019.2 or below, and Assets/Plugins/Android/baseProjectTemplate.gradle for Unity 2019.3 or above.
In that template, update the line below with the appropriate Gradle version:
classpath com.android.tools.build:gradle:«x».«x».«x»
compileSdkVersionGoogle Mobile Ads SDK versions 23.1.0 and newer require a compileSdkVersion of at least 34.
Set the compileSdkVersion to 34 or higher in your app’s build.gradle.
Refer to the Google Mobile Ads SDK Release Notes for the latest compileSdkVersion requirements.
Select the ad networks you want to integrate. Then follow the iOS-specific instructions on this page.
Developers and publishers who use Google AdSense, AdManager, or AdMob must use a consent management platform (CMP) that Google certifies. The CMP must integrate with IAB’s Transparency and Consent Framework when you serve ads to users in the European Economic Area (EEA) or the UK. See Privacy: “TCF v2 consent” for more information.
Open the Integration Manager (AppLovin > Integration Manager) and install the latest Google bidding and Google AdMob adapter:

If your project uses the Meta Audience Network Unity SDK, you must be on version 11.0 or later for the MAX Meta Audience Network adapter to function.
To migrate from an older version of Meta Audience Network Unity SDK, delete the Assets/FacebookSDK directory, then download and re-import the latest version here.
If you aren’t using the Meta Audience Network Unity Plugin, you can follow the instructions here under “Unity SDK, v5.10+ (not using the Audience Network-supplied Unity wrapper)” to add a wrapper for the relevant methods.
If you do not want to enable Limited Data Use (LDU) mode, pass SetDataProcessingOptions() an empty string array:
using AudienceNetwork;
⋮
AdSettings.SetDataProcessingOptions(new string[] { });
⋮
// Initialize MAX SDK
If you want to enable LDU for users and to specify user geography, call SetDataProcessingOptions() like this:
using AudienceNetwork;
⋮
AdSettings.SetDataProcessingOptions(new string[] {"LDU"}, «country», «state»);
⋮
// Initialize MAX SDK
If you use Google UMP as your CMP, you can determine whether the user consented to Meta. To do so, use the following code:
bool? hasMetaConsent = MaxSdkUtils.GetAdditionalConsentStatus(89);
if ( hasMetaConsent != null )
{
// Set Meta Data Processing Options accordingly.
}
else
{
// AC String is not available on disk. Please check for consent status after the user completes the CMP flow.
}
To learn how to implement Meta Audience Network’s “Limited Data Use” flag in California, read the Meta for Developers documentation.
Version 6.2.1 of Audience Network SDK introduces the following requirement:
setAdvertiserTrackingEnabled flag, irrespective of the use of mediation.
This informs Meta whether to use the data to deliver personalized ads.MaxSdkCallbacks.OnSdkInitializedEvent += (MaxSdk.SdkConfiguration sdkConfiguration) => {
#if UNITY_IOS || UNITY_IPHONE || UNITY_EDITOR
if (MaxSdkUtils.CompareVersions(UnityEngine.iOS.Device.systemVersion, "14.5") != MaxSdkUtils.VersionComparisonResult.Lesser)
{
// Note that App transparency tracking authorization can be checked via `sdkConfiguration.AppTrackingStatus` for Unity Editor and iOS targets
// 1. Set Meta ATE flag here, THEN
}
#endif
// 2. Load ads
};Starting from Pangle iOS adapter version 4.9.1.0.0, Pangle is no longer available in Chinese Mainland. To monetize Chinese Mainland traffic, configure the CSJ network and add the CSJ adapter. For global traffic that excludes Chinese Mainland, you can continue to use Pangle for monetization.
The Integration Manager automatically integrates SKAdNetwork IDs of integrated networks on your behalf.
To integrate Amazon for Unity, refer to the Amazon Publisher Services integration instructions page.
You can access the AppLovin Integration Manager from your Unity IDE. It allows you to install or upgrade mediation adapters and the mediation plugin itself.
To launch the Integration Manager, select AppLovin > Integration Manager from the Unity menu bar.

This displays a pop up window with a list of available mediation networks. You can Install or Upgrade ad networks by clicking buttons in the Action column.
