Ad revenue(広告収益)

SDKによるインプレッションレベルの広告収益レポート

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

概要

広告収益レポーティングオプション

広告収益は、集計レベルの粒度(API経由)またはインプレッションレベルの粒度(SDK経由)のいずれかでAppsFlyerにレポートされます。SDK経由のインプレッションレベルデータは次のような特徴があります:

  • データの更新頻度がより頻繁で、AppsFlyerでより早く利用可能になります。
  • Supports SKAN.

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

Reporting ad revenue using the SDK

SDKの動作原則

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 Android ad revenue SDK connector, you need to import, initialize, and trigger the SDK.

Import the Android ad revenue SDK

  1. Add the following code to Module-level /app/build.gradle before dependencies:
repositories { 
  mavenCentral()
}
  1. Add com.appsflyer:adrevenue:6.4.3 as a dependency:
dependencies {
    implementation 'com.appsflyer:adrevenue:6.4.3'
}
  1. プロジェクトを同期して、dependenciesを取得します。

Initialize the Android ad revenue SDK

  • In the app global class, inside the onCreate method, call initialize, and put the following code:
import com.appsflyer.adrevenue.AppsFlyerAdRevenue;

public class MyApplication extends Application {
    
    @Override
    public void onCreate() {
        super.onCreate();
        
        AppsFlyerAdRevenue.Builder afRevenueBuilder = new AppsFlyerAdRevenue.Builder(this);     
        
        AppsFlyerAdRevenue.initialize(afRevenueBuilder.build());

Trigger the logAdRevenue API call

  • Trigger the logAdRevenue API call upon every valid impression, including mandatory, and any optional, arguments.
// Make sure you import the following:

import com.appsflyer.adrevenue.adnetworks.AppsFlyerAdNetworkEventType;
import com.appsflyer.adrevenue.adnetworks.generic.MediationNetwork;
import com.appsflyer.adrevenue.adnetworks.generic.Scheme;

import java.util.Currency;
import java.util.HashMap;
import java.util.Locale;

// Create optional customParams

Map<String, String> customParams = new HashMap<>();
customParams.put(Scheme.COUNTRY, "US");
customParams.put(Scheme.AD_UNIT, "89b8c0159a50ebd1");
customParams.put(Scheme.AD_TYPE, AppsFlyerAdNetworkEventType.BANNER.toString());
customParams.put(Scheme.PLACEMENT, "place");
customParams.put(Scheme.ECPM_PAYLOAD, "encrypt");
customParams.put("foo", "test1");
customParams.put("bar", "test2");

// Record a single impression
AppsFlyerAdRevenue.logAdRevenue(
        "ironsource",
        MediationNetwork.googleadmob,
        Currency.getInstance(Locale.US),
        0.99,
        customParams
);

このページは役に立ちましたか?