Ad revenue

At a glance: The AppsFlyer ad revenue SDK connector enables the ad networks to report ad revenue using impression-level granularity.


Ad revenue reporting options

Ad revenue is reported to AppsFlyer by either aggregate granularity (via API) or impression-level granularity (via SDK). Impression-level data via SDK:

  • Has better data freshness and earlier availability in AppsFlyer.
  • Supports SKAN.

This document details how to send impression-level ad revenue provided by partners in the app to AppsFlyer.



The marketer also needs to configure the integration for each mediation partner in AppsFlyer, either impression-level (via SDK) or impression-level (via SDK) with device-level (via S2S API). Learn more

Reporting ad revenue using the SDK

SDK principles of operation

The ad revenue SDK connector sends impression revenue data to the AppsFlyer SDK. An ad revenue event, af_ad_revenue, is generated and sent to the platform. These impression events are collected and processed in AppsFlyer, and the revenue is attributed to the original UA source.


To integrate the iOS ad revenue SDK connector, you need to import, initialize, and trigger the SDK.

Import the iOS ad revenue SDK

  1. In your Podfile, specify the following:
pod 'AppsFlyer-AdRevenue'

Important: If you have the AppsFlyerFramework pod in your Podfile, remove it to avoid a collision.

  1. Run the pod update.

Initialize the iOS ad revenue SDK

  • In AppDelegate, in the didFinishLaunchingWithOptions method, call the AdRevenue start method using the following code:
import AppsFlyerLib
import AppsFlyerAdRevenue

class AppDelegate: UIResponder, UIApplicationDelegate {

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

     @objc func applicationDidBecomeActive() {


Trigger the logAdRevenue API call

  • Trigger the logAdRevenue API call upon every valid impression, including mandatory, and any optional, arguments.
let adRevenueParams:[AnyHashable: Any] = [
                    kAppsFlyerAdRevenueCountry : "us",
                    kAppsFlyerAdRevenueAdUnit : "02134568",
                    kAppsFlyerAdRevenueAdType : "Banner",
                    kAppsFlyerAdRevenuePlacement : "place",
                    "foo" : "testcustom",
                    "bar" : "testcustom2"
    monetizationNetwork: "facebook",
    mediationNetwork: MediationNetworkType.googleAdMob,
    eventRevenue: 0.026,
    revenueCurrency: "USD",
    additionalParameters: adRevenueParams)