[Deprecated] Google Mobile Ads impression-level ad revenue reporting by SDK

At a glance: The AppsFlyer ad revenue SDK connector works with the Google Mobile Ads (GMA) SDK to report ad revenue with impression-level granularity. Note! This SDK connector is deprecated as of AppsFlyer SDK V6.9+, and is replaced by the generic ad revenue SDK connector. This version continues to work for earlier SDK versions, but will not be updated or changed. 

mceclip1.png

Impression-level ad revenue reporting by SDK

Ad revenue reporting options

Ad revenue is reported to AppsFlyer by AdMob 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 AdMob in the app, to AppsFlyer. 

Reporting ad revenue using the GMA SDK

SDK principles of operation

The AppsFlyer ad revenue SDK connector for AdMob automatically collects impression revenue data provided by the GMA SDK. An ad revenue event, af_ad_revenue, is generated within the platform and the event is recorded with the revenue attributed to the original UA source.

In the platform, a batch process extracts the attribution for each device, and revenue attribution is performed.

Data display

The af_ad_revenue event is used to identify ad revenue. This event is used throughout the platform, including the dashboard and data delivery tools.

Considerations when migrating from API to SDK

If you currently receive ad revenue by API from integrated partners that are mediated by AdMob, you can continue to do so. However, make sure that in the AppsFlyer platform you disable the integration with these partners when you implement the GMA monetization SDK. If you don't, ad revenue attribution may be duplicated. 

If you currently send ad revenue in-app events without revenue, for recording purposes only, you can continue sending them or disable them. In any event, they don't impact the allocation of impression-level revenue in the dashboard.

Note: Some time can pass from the time you release the app version containing the ad revenue SDK to the app stores until your app users download the updated version. As such, leave the SDK module dormant and activate it after most of the users have updated the app. When you activate the module:

  • Simultaneously disable the ad revenue integration of partners who mediate through AdMob
  • In AppsFlyer, select impression level in the AdMob ad revenue tab.

Implementing AppsFlyer ad revenue SDK

Implementing ad revenue SDK with AdMob

Ad revenue SDK implementation workflow
Step Action required
1

Ask your AdMob account manager to enable AdMob impression-level LTV (iLTV).

2 Verify that you use GMA SDK 8.12.0 or higher for Android or iOS and that the version supports iLTV.
3 Enable SDK-level ad revenue in AppsFlyer. Note: This needs to be done for each app individually.
4 Integrate the AppsFlyer ad revenue SDK using the instructions in the following section. The integration for iOS and Android is somewhat different, so make sure you follow the separate instructions.
5

To switch (migrate) from API ad revenue reporting to SDK ad revenue reporting, see considerations when migrating from API to SDK in this article.

Ad revenue SDK module for developers

 Note

Currently, the ad revenue SDK only supports integration with AdMob and MoPub.

Prerequisites

  • Enable iLTV for your AdMob account
  • Use AppsFlyer SDK version 6.4.2+. You can find the latest version here.
  • Integrate GMA SDK version 8.12.0+ into the app:
Android iOS

Import the Android ad revenue SDK

  1. Add the code below to Module-level /app/build.gradle before dependencies:
    repositories { 
      mavenCentral()
    }
    
  2. Add com.appsflyer:adrevenue:6.4.2 as a dependency:
    dependencies {
        implementation 'com.appsflyer:adrevenue:6.4.2'
    }
  3. Sync the project to retrieve the dependencies.

Initialize the Android ad revenue SDK

The following takes place inside the app global application class.

  • In the app global class, inside the onCreate method, place the following code:
    public class MyApplication extends Application {
        
        @Override
        public void onCreate() {
            super.onCreate();
            
            AppsFlyerAdRevenue.Builder afRevenueBuilder = new AppsFlyerAdRevenue.Builder(Application: this);     
            afRevenueBuilder.addNetworks(AppsFlyerAdRevenueWrapperType.GOOGLE_ADMOB);
            
            //Optional
            afRevenueBuilder.adEventListener(new Consumer() {
                @Override
                public void accept(AppsFlyerAdEvent appsFlyerAdEvent) {
                    appsFlyerAdEvent.getAdNetworkEventType();
                    appsFlyerAdEvent.getAdNetworkActionName();
                    appsFlyerAdEvent.getAdNetworkPayload();
                    appsFlyerAdEvent.getAdNetworkName();
                }
            });
            
            AppsFlyerAdRevenue.initialize(afRevenueBuilder.build());
            
    AppsFlyerAdMobWrapper afAdRevenueGoogle = AppsFlyerAdRevenue.adMobWrapper();
    
    …
    // Per each ad object (i.e Banner, Interstitial, Native, AppOpen etc)
    ad.setAdListener(new AdListener() {
        @Override
        public void onAdLoaded() {
            ad.setOnPaidEventListener(adValue ->
                    afAdRevenueGoogle.recordImpression(adView, adValue));
    
    }
    

Traits and limitations

Trait Remarks 
Ad revenue value Impression events with revenue values above $10 (and the equivalent in other currencies) aren't processed by the SDK connector.