Integration

Effective March 1st, 2024, AppLovin AppDiscovery demand will require SDK versions 10.0.0 and above (Unity plugin versions 4.0.0 and above). AppLovin Exchange demand and MAX mediation functionality are not impacted. Update to the latest AppLovin SDKs to benefit from the latest features and avoid potential revenue impact.

This page shows you how to download, import, and configure the AppLovin MAX Unity Plugin.

Download the Latest Unity Plugin

If you want to receive release updates, subscribe to the AppLovin MAX Unity Plugin GitHub repository.

Import the Plugin into Unity

Take the following steps to import the plugin you downloaded:

  1. In Unity, select Assets > Import Package > Custom Package…
  2. Choose the Unity Plugin file you downloaded.
  3. In the Import Unity Package dialog, click Import.

Requirements

  • Either Unity 5.x.x, or Unity 2017.x.x or later.
  • For Android builds, the AppLovin MAX plugin requires that you enable Jetifier. To enable Jetifier, take the following steps:
    1. In Unity, select Assets > External Dependency Manager > Android Resolver > Settings.
    2. In the Android Resolver Settings dialog that appears, check Use Jetifier.
    3. Click OK.
  • For iOS builds:
  • Call all AppLovin MAX APIs on the main thread.

Integrate Custom SDK Adapters

AppLovin Exchange (ALX) supports a custom adapter for LinkedIn. Integration instructions are below and more information can be found here.

You can install the adapter through the AppLovin Unity Plugin’s Integration Manager. In Unity, select AppLovin > Integration Manager, then press the Install button for the LinkedIn adapter under AppLovin Micro SDK Partners.

AppLovin Integration Manager. AppLovin Micro S.D.K. Partners. Network: LinkedIn. Current Version: ios_1.1.1.1. Latest Version: ios_1.1.1.1. Actions: Install.

Enable Ad Review

To enable the MAX Ad Review service, add your AppLovin SDK Key in the AppLovin Integration Manager:

  1. In Unity, select AppLovin > Integration Manager. The AppLovin Integration Manager dialog appears.
  2. Check Enable MAX Ad Review and type your SDK Key in the field labeled AppLovin SDK Key.
  3. Close the AppLovin Integration Manager dialog.

You can find your SDK key in the Account > General > Keys section of the AppLovin dashboard.

Initialize the SDK

Attach the OnSdkInitializedEvent event handler, then set the SDK key and initialize the SDK as soon as your app launches, as in the following code sample.

You may want to tag users with your own internal user ID so that you can then receive that ID in an impression-level user revenue API or in S2S rewarded postbacks. If so, set the user ID before you initialize the SDK.

Ad assets that are fully cached result in a better user experience. Therefore, always initialize the AppLovin SDK on startup so as to give mediated networks the maximum amount of time to cache ads. This is especially important with video ads.

Do not use different network app IDs for the same network across different ad units. If you use different app IDs for the same network and app package name without using selective init you will break the network initialization process.

MaxSdkCallbacks.OnSdkInitializedEvent += (MaxSdkBase.SdkConfiguration sdkConfiguration) => {
  // AppLovin SDK is initialized, start loading ads
};

MaxSdk.SetSdkKey("sdk-key");
MaxSdk.SetUserId("user-id");
MaxSdk.InitializeSdk();

You can find your SDK key in the Account > General > Keys section of the AppLovin dashboard.

iOS 14 Support

In iOS 14, Apple introduced global privacy changes that you need to comply with. This section explains how to comply with these changes and thereby avoid a material drop in revenue.

SKAdNetwork

The Unity Plugin automatically updates your app’s Info.plist with network-specific identifiers.

MAX Terms & ATT Flow

Implement the MAX Terms & ATT Flow to integrate compliance with the ATT framework and acceptance of your Terms of Service and Privacy Policy.

Consent and Data APIs

In order to ensure you obtain consent from your users in applicable jurisdictions on behalf of our monetization partners and correctly pass consent flag values to AppLovin, please review Privacy–Consent and Data APIs.

iOS 15 Global SKAdNetwork Reporting

Starting with iOS 15, Apple allows developers to send a copy of their SKAdNetwork install postbacks to an endpoint of their choice. MAX provides a Global SKAdNetwork Report (MAX > Mediation > Analyze > Global SKA Report) for developers to access the SKAdNetwork data across all their network partners in one place.

You can check the value of your app’s SKAdNetwork endpoint by using the Mediation Debugger.

To forward the SKAdNetwork postbacks to one or more third-party endpoints of your choice, please contact your account team. Note that independent of this Apple feature, AppLovin automatically sends a copy of all SKAdNetwork postbacks to the relevant campaign attribution MMP.

This feature is available to you in the MAX Unity plugin, starting with version 4.3.8. If you would like to enable this feature, you can do so in the AppLovin Integration Manager by following these instructions:

  1. In Unity, select AppLovin > Integration Manager. The AppLovin Integration Manager dialog appears.
  2. Check the Set Advertising Attribution Report Endpoint in Info.plist setting under Other Settings.
    Other Settings: ☑ Set Advertising Attribution Report Endpoint in Info.plist (iOS only), ☑ Enable Auto Update, ☐ Enable Verbose Logging
  3. Close the AppLovin Integration Manager dialog.

External Dependency Manager

The External Dependency Manager (EDM) is bundled with the MAX Unity Plugin. It provides a standardized way to include and manage third-party assets, such as scripts, plugins, and frameworks, to extend the functionality of Unity projects.

So that the MAX Unity Plugin functions correctly, you need to update iOS resolver settings by following these instructions:

  1. Open the iOS Resolver Settings (Assets > External Dependency Manager > iOS Resolver > Settings).
  2. Uncheck the Add use_frameworks! to Podfile setting.
  3. Uncheck the Always add the main target to Podfile setting.
  4. Click OK.

The final result should look like this:

iOS Resolver Settings: Podfile Generation, Cocoapods Integration: Xcode Workspace - Add Cocoapods to the Xcode workspace, Use Shell to Execute Cocoapod Tool, Auto Install Cocoapod Tools in Editor. Podfile Configurations: Add use_frameworks! to Podfile, Always add the main target to Podfile, Enable Analytics Reporting, Verbose Logging, Use project settings. Reset to Defaults button. Cancel button. OK button.