Impression-level revenue integration for Flutter
Integrate the Impression Level Revenue (ILR) SDK API to capture real-time ad revenue data for each impression, enabling detailed monetization insights and seamless integration with third-party analytics platforms.
読み終わるまでの所要時間 1 分最終更新 5ヶ月前
Prerequisites
Ensure that you have correctly integrated the LevelPlay SDK 7.0.3+ into your application.
Implement the ImpressionData Listener
The Unity LevelPlay SDK fires postbacks to inform you about the displayed ad. The listener is an optional listener that you can implement to receive impression data. This listener provides you with information about all ad units, and enables you to identify the different ads using the impression level revenue.
LevelPlayImpressionDataIf you want to add the listener to your application, make sure you declare the listener before initializing the Unity LevelPlay SDK, to avoid any loss of information.
LevelPlayImpressionDataLevelPlay.addImpressionDataListener(this);
The Unity LevelPlay SDK will notify your listener of the success post-backs, related to impression data. Refer to the following example:
onImpressionSuccessabstract class LevelPlayImpressionDataListener { void onImpressionSuccess(LevelPlayImpressionData? impressionData);}
Integrate the ILR data
After you implement the , you can use the impression data and send it to your own proprietary BI tools and DWH, or to integrate it with third-party tools.
LevelPlayImpressionDataListenerYou can refer to each field separately or get all information by using the allData method:
@overridevoid onImpressionSuccess(LevelPlayImpressionData? impressionData) { String? auctionId = impressionData?.auctionId; String? adUnit = impressionData?.adUnit; String? adUnitName = impressionData?.adUnitName; String? adUnitId = impressionData?.adUnitId; String? adFormat = impressionData?.adFormat; String? country = impressionData?.country; String? ab = impressionData?.ab; String? segmentName = impressionData?.segmentName; String? placement = impressionData?.placement ; String? adNetwork = impressionData?.adNetwork; String? instanceName = impressionData?.instanceName; String? instanceId = impressionData?.instanceId; double? revenue = impressionData?.revenue; String? precision = impressionData?.precision; double? lifetimeRevenue = impressionData?.lifetimeRevenue; String? encryptedCPM = impressionData?.encryptedCPM; double? conversionValue = impressionData?.conversionValue;}