---
title: iOS – AppLovin Max
description: "The Tenjin SDK can fetch to AppLovin impression level revenue data and send revenue events to Tenjin.  This integration will send revenue related for each ad impression served from AppLovin.  Here are the steps to integrate: 1. Install the AppLovin…"
url: "https://tenjin.com/tr/docs/ios-applovin-max/"
updated: "2026-06-15"
category: Revenue Measurement / Ad Revenue / Ad Revenue (Ad Mediation) Setup / Applovin MAX
---

# iOS – AppLovin Max

The Tenjin SDK can fetch to AppLovin impression level revenue data and send revenue events to Tenjin.  This integration will send revenue related for each ad impression served from AppLovin.  Here are the steps to integrate:

1. Install the AppLovin iOS SDK: [https://developers.axon.ai/en/max/ios/overview/integration](https://developers.axon.ai/en/max/ios/overview/integration)

   Please ensure you have the latest AppLovin iOS SDK installed (> 11.0.0)
2. Pass the revenue data to Tenjin, using the following sample code.

### Objective-C

 Objective-C

```
- (void)didPayRevenueForAd:(MAAd *)ad {
  double revenue = ad.revenue;  // In USD

  // Create JSON object for Tenjin
  NSDictionary *impressionData = @{
    @"creative_id" : ad.creativeIdentifier ?: @"",
    @"placement" : ad.placement ?: @"",
    @"format" : ad.format.displayName ?: @"",
    @"country" : [ALSdk shared].configuration.countryCode ?: @"",
    @"ad_revenue_currency" : @"USD",
    @"network_placement" : ad.networkPlacement ?: @"",
    @"revenue_precision" : ad.revenuePrecision ?: @"",
    @"ad_unit_id" : ad.adUnitIdentifier ?: @"",
    @"revenue" : @(revenue),
    @"network_name" : ad.networkName ?: @""
  };

  // Convert to JSON string
  NSError *error;
  NSData *jsonData = [NSJSONSerialization dataWithJSONObject:impressionData
                                                     options:0
                                                       error:&error];

  NSString *jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];

  // Send to Tenjin
  [TenjinSDK appLovinImpressionFromJSON:jsonString];

  NSLog(@"Sent impression to Tenjin: %@", jsonString);
}
```

---

### Swift

 Swift

```
func didPayRevenue(_ ad: MAAd) {
    let revenue = ad.revenue // In USD

    // Create JSON object for Tenjin
    let impressionData: [String: Any] = [
        "creative_id": ad.creativeIdentifier ?? "",
        "placement": ad.placement ?? "",
        "format": ad.format.displayName ?? "",
        "country": ALSdk.shared().configuration.countryCode ?? "",
        "ad_revenue_currency": "USD",
        "network_placement": ad.networkPlacement ?? "",
        "revenue_precision": ad.revenuePrecision ?? "",
        "ad_unit_id": ad.adUnitIdentifier ?? "",
        "revenue": revenue,
        "network_name": ad.networkName ?? ""
    ]

    // Convert to JSON string
    do {
        let jsonData = try JSONSerialization.data(withJSONObject: impressionData, options: [])
        if let jsonString = String(data: jsonData, encoding: .utf8) {
            // Send to Tenjin
            TenjinSDK.appLovinImpressionFromJSON(jsonString)
            print("Sent impression to Tenjin: \(jsonString)")
        }
    } catch {
        print("Error creating JSON: \(error)")
    }
}
```

Here is an example impression level revenue data entry from AppLovin. **For a revenue parameter, use double type, not string type**.

| Parameter | Required? | Example |
| --- | --- | --- |
| creative_id | No | 2813803997 |
| placement | No | placementBanner |
| format | No | BANNER |
| country | No | DE |
| ad_revenue_currency | No | USD |
| network_placement | No | banner_regular |
| revenue_precision | No | exact |
| ad_unit_id | No | a7d1aa174c93c716 |
| revenue | Yes | 4.7455200000000006E-5 |
| network_name | Yes | APPLOVIN_EXCHANGE |

---

reference: https://developers.axon.ai/en/max/ios/overview/advanced-settings/#impression-level-user-revenue-api
