Ad revenue(広告収益)
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 iOS ad revenue SDK connector, you need to import, initialize, and trigger the SDK.
Import the iOS ad revenue SDK
- 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.
- Run the pod update.
Initialize the iOS ad revenue SDK
- In
AppDelegate
, in thedidFinishLaunchingWithOptions
method, call the AdRevenuestart
method using the following code:
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
- Trigger the
logAdRevenue
API call upon every valid impression, including mandatory, and any optional, arguments.
let adRevenueParams:[AnyHashable: Any] = [
kAppsFlyerAdRevenueCountry : "us",
kAppsFlyerAdRevenueAdUnit : "02134568", //Add ! here
kAppsFlyerAdRevenueAdType : "Banner", //Add ! here
kAppsFlyerAdRevenuePlacement : "place",
kAppsFlyerAdRevenueECPMPayload : "encrypt",
"foo" : "testcustom",
"bar" : "testcustom2"
]
AppsFlyerAdRevenue.shared().logAdRevenue(
monetizationNetwork: "facebook",
mediationNetwork: MediationNetworkType.moPub,
eventRevenue: 0.026,
revenueCurrency: "USD",
additionalParameters: adRevenueParams)
更新済 4か月前