文档

支持

LevelPlay SDK - Flutter

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 分钟最后更新于 6 天前

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
LevelPlayImpressionData
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.
If you want to add the
LevelPlayImpressionData
listener to your application, make sure you declare the listener before initializing the Unity LevelPlay SDK, to avoid any loss of information.
LevelPlay.addImpressionDataListener(this);
The Unity LevelPlay SDK will notify your listener of the success post-backs, related to impression data. Refer to the following
onImpressionSuccess
example:
abstract class LevelPlayImpressionDataListener { void onImpressionSuccess(LevelPlayImpressionData? impressionData);}

Integrate the ILR data

After you implement the
LevelPlayImpressionDataListener
, 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.
You 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;}