광고 수익
SDK에서 노출 수준 광고 수익 리포트하기
요약 : 앱스플라이어 광고 수익 SDK 커넥터를 사용하면 광고 네트워크에서 노출 수준 세분성을 사용하여 광고 수익을 리포트할 수 있습니다.
개요
광고 수익 리포트 옵션
광고 수익은 집약 세분성(API를 통해) 또는 노출 수준 세분성(SDK를 통해)에 의해 앱스플라이어에 리포트됩니다. SDK를 통한 노출 수준 데이터는 앱스플라이어에서 더 나은 데이터 최신성과 더 빠른 가용성을 제공합니다.
이 문서는 앱에서 파트너가 제공하는 노출 수준 광고 수익을 앱스플라이어로 보내는 방법을 자세히 설명합니다.
Reporting ad revenue using the SDK
SDK 작동 원리
광고 수익 SDK 커넥터는 노출 수익 데이터를 앱스플라이어 SDK로 보냅니다. 광고 수익 이벤트 af_ad_revenue가 생성되어 플랫폼으로 전송됩니다. 이러한 노출 이벤트는 앱스플라이어에서 수집 및 처리되며 수익은 원래 UA 소스에 어트리뷰트됩니다.
연동
안드로이드 광고 수익 SDK 커넥터를 통합하려면 SDK를 가져와서 초기화하고 트리거해야 합니다.
Import the Android ad revenue SDK
- 다음 코드를 모듈 수준 / app/build.gradle 파일의 dependencies 앞에 추가합니다:
repositories {
mavenCentral()
}
- 광고 수익 라이브러리를 종속 항목으로 추가합니다.
dependencies {
implementation 'com.appsflyer:adrevenue:6.9.0'
}
- 프로젝트를 동기화하여 종속성을 검색합니다.
Initialize the Android ad revenue SDK
- 앱 글로벌 클래스에서
onCreate
메서드, 호출initialize
, 다음 코드를 구현합니다:
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());
}
}
```java
### Trigger the logAdRevenue API call
- Trigger the [`logAdRevenue`](https://ko.dev.appsflyer.com/hc/docs/appsflyeradrevenue#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, "Banner");
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
);
최신 데이터 16일 전