광고 수익

요약 : 앱스플라이어 광고 수익 SDK 커넥터를 사용하면 광고 네트워크에서 노출 수준 세분성을 사용하여 광고 수익을 리포트할 수 있습니다.

개요

광고 수익 리포트 옵션

광고 수익은 집약 세분성(API를 통해) 또는 노출 수준 세분성(SDK를 통해)에 의해 앱스플라이어에 리포트됩니다. SDK에 의한 노출 수준 데이터:

  • 앱스플라이어에서 더 나은 데이터 최신성과 더 빠른 가용성을 제공합니다.
  • SKAN을 지원합니다.

이 문서는 앱에서 파트너가 제공하는 노출 수준 광고 수익을 앱스플라이어로 보내는 방법을 자세히 설명합니다.

Reporting ad revenue using the SDK

SDK 작동 원리

광고 수익 SDK 커넥터는 노출 수익 데이터를 앱스플라이어 SDK로 보냅니다. 광고 수익 이벤트 af_ad_revenue가 생성되어 플랫폼으로 전송됩니다. 이러한 노출 이벤트는 앱스플라이어에서 수집 및 처리되며 수익은 원래 UA 소스에 어트리뷰트됩니다.

연동

iOS 광고 수익 SDK 커넥터를 통합하려면 SDK를 가져와서 초기화하고 트리거해야 합니다.

Import the iOS ad revenue SDK

  1. Podfile에서 다음을 지정합니다:
pod 'AppsFlyer-AdRevenue'

중요: Podfile에 AppsFlyerFramework 포드가 있는 경우 충돌을 방지하기 위해 삭제하십시오.

  1. 포드 업데이트를 실행합니다.

Initialize the iOS ad revenue SDK

  • In AppDelegate, 메서드 didFinishLaunchingWithOptions 에서, 다음 코드를 사용하여 start AdRevenue를 호출합니다:
import AppsFlyerLib
import AppsFlyerAdRevenue

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
  

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

     @objc func applicationDidBecomeActive() {
        AppsFlyerLib.shared().start()        
    }

}

Trigger the logAdRevenue API call

  • 필수 및선택적 인수를 포함하여 모든 유효한 노출에 대해 logAdRevenue API 호출을 트리거합니다.
let adRevenueParams:[AnyHashable: Any] = [
                    kAppsFlyerAdRevenueCountry : "us",
                    kAppsFlyerAdRevenueAdUnit : "02134568",
                    kAppsFlyerAdRevenueAdType : "Banner",
                    kAppsFlyerAdRevenuePlacement : "place",
                    kAppsFlyerAdRevenueECPMPayload : "encrypt",
                    "foo" : "testcustom",
                    "bar" : "testcustom2"
                ]
                
AppsFlyerAdRevenue.shared().logAdRevenue(
    monetizationNetwork: "facebook",
    mediationNetwork: MediationNetworkType.googleAdMob,
    eventRevenue: 0.026,
    revenueCurrency: "USD",
    additionalParameters: adRevenueParams)