skills/marketing-growth/applovin-ads-integration/SKILL.md
Integrate AppLovin MAX mediation and ad campaigns for mobile commerce apps with user acquisition, retargeting, and in-app purchase event tracking
npx skillsauth add finsilabs/awesome-ecommerce-skills applovin-ads-integrationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
AppLovin is a leading mobile advertising platform for commerce apps — combining the MAX mediation SDK (monetizing your app with ads) and AppLovin Ads (acquiring users and running retargeting campaigns). This skill applies to merchants who have a native iOS or Android shopping app and want to run user acquisition campaigns or monetize with in-app ads. It is not relevant for web-only stores.
AppLovin serves two distinct use cases — choose the right one:
| Goal | What to Use | Difficulty | |------|------------|------------| | Acquire new app users and retarget existing ones | AppLovin Ads (demand-side platform) | Medium — configure via dashboard at manage.applovin.com | | Monetize your app by showing ads to users | AppLovin MAX SDK | High — requires SDK integration in your mobile app | | Track purchase events for ROAS optimization | SDK + MMP (Adjust, AppsFlyer, or Singular) | High — requires server-side postback setup |
Prerequisite: You need an AppLovin account at applovin.com and a mobile app that exists on the App Store or Google Play.
iOS (CocoaPods):
Add to your Podfile:
pod 'AppLovinSDK'
pod 'AppLovinMediationGoogleAdMobAdapter'
pod 'AppLovinMediationMetaAudienceNetworkAdapter'
Initialize in AppDelegate.swift:
import AppLovinSDK
func application(_ app: UIApplication, didFinishLaunchingWithOptions opts: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
ALSdk.shared().mediationProvider = "max"
ALSdk.shared().userIdentifier = currentUser?.id ?? ""
ALSdk.shared().initializeSdk { sdkConfig in
// SDK ready — load your first ad
}
return true
}
Android (Gradle):
In app/build.gradle:
dependencies {
implementation 'com.applovin:applovin-sdk:+'
implementation 'com.applovin.mediation:google-adapter:+'
implementation 'com.applovin.mediation:facebook-adapter:+'
}
In Application.onCreate():
AppLovinSdk.getInstance(this).apply {
mediationProvider = "max"
userIdentifier = currentUser?.id ?: ""
initializeSdk { /* SDK ready */ }
}
Do not run AppLovin campaigns without an MMP. Direct postbacks miss cross-device attribution and SKAdNetwork decoding. Use one of:
Each MMP provides an AppLovin integration module that automatically sends purchase postbacks. In your MMP dashboard:
Fire purchase events immediately after a confirmed purchase — both client-side and server-side:
Client-side (iOS):
func trackPurchase(orderId: String, revenue: Double, currency: String) {
ALEventService.shared().trackEvent(ALEventTypePurchasedProduct, withParameters: [
ALEventParameterRevenueAmount: NSNumber(value: revenue),
ALEventParameterRevenueCurrency: currency,
ALEventParameterProductIdentifier: orderId,
])
}
// Also track add-to-cart for retargeting signal
func trackAddToCart(productId: String, price: Double) {
ALEventService.shared().trackEvent(ALEventTypeAddedItemToCart, withParameters: [
ALEventParameterProductIdentifier: productId,
ALEventParameterRevenueAmount: NSNumber(value: price),
])
}
Server-side postback (for signal reliability):
async function sendApplovinPurchasePostback(params: {
userId: string;
orderId: string;
revenue: number;
currency: string;
applovinId?: string;
}) {
const url = new URL('https://d.applovin.com/postback/v1/purchase');
url.searchParams.set('event_token', process.env.APPLOVIN_POSTBACK_TOKEN!);
url.searchParams.set('event_name', 'purchase');
url.searchParams.set('user_id', params.userId);
url.searchParams.set('transaction_id', params.orderId);
url.searchParams.set('revenue', params.revenue.toFixed(2));
url.searchParams.set('currency', params.currency);
if (params.applovinId) url.searchParams.set('device_id', params.applovinId);
await fetch(url.toString());
}
In AppLovin's advertising dashboard at manage.applovin.com:
If you are monetizing your app with in-app ads (not just running user acquisition), configure your waterfall in the MAX dashboard:
Load and show interstitial ads in your app:
class CartViewController: UIViewController {
var interstitialAd: MAInterstitialAd?
override func viewDidLoad() {
super.viewDidLoad()
interstitialAd = MAInterstitialAd(adUnitIdentifier: "YOUR_AD_UNIT_ID")
interstitialAd?.delegate = self
interstitialAd?.load()
}
}
extension CartViewController: MAAdDelegate {
func didLoad(_ ad: MAAd) { /* ready to show */ }
func didHide(_ ad: MAAd) {
interstitialAd?.load() // preload immediately after hide
}
}
Map your purchase value ranges to SKAdNetwork conversion values (0–63) in both AppLovin's dashboard and your app code:
func updateSKANConversionValue(orderValue: Double) {
let conversionValue: Int
switch orderValue {
case 0..<25: conversionValue = 10
case 25..<50: conversionValue = 20
case 50..<100: conversionValue = 30
case 100..<200: conversionValue = 40
default: conversionValue = 63
}
if #available(iOS 16.1, *) {
SKAdNetwork.updatePostbackConversionValue(conversionValue, coarseValue: .high, lockWindow: false) { _ in }
} else {
SKAdNetwork.updateConversionValue(conversionValue)
}
}
Configure the identical schema in AppLovin's SKAN configuration panel (MAX → SKAN Configuration) so the platform can decode postbacks.
load() immediately after didHide to have an ad ready for the next impression| Problem | Solution |
|---------|----------|
| Purchase postbacks not registering | Verify postback token is correct; ensure revenue uses decimal format (not integer) |
| SDK fails to initialize on iOS | Add NSUserTrackingUsageDescription to Info.plist; implement ATT prompt before SDK init |
| ROAS campaign underspending | Lower your tROAS target; ensure 50+ purchase events/day for the algorithm to optimize |
| SKAN conversion values showing all zeros | Confirm updateConversionValue is called after final purchase confirmation, not just payment intent |
| Rewarded ad not loading after first show | Call load() in didHide callback, not didDisplay |
| Android GAID missing in postbacks | Request AD_ID permission on Android 13+; user may have limited ad tracking in device settings |
tools
Let shoppers save products to a wishlist, share it with friends, and get notified when saved items come back in stock or drop in price
development
Build a themeable storefront with design tokens and CSS custom properties that supports white-labeling, multi-brand variants, and dark mode
development
Speed up product discovery with instant search suggestions, fuzzy typo matching, and category-aware results powered by Algolia or Elasticsearch
development
Build a mobile-first storefront with thumb-friendly navigation, sticky add-to-cart buttons, and touch-optimized components for high mobile conversion