Impression Level Revenue Integration Flutter

Before you start

Make sure you have correctly integrated the Unity LevelPlay SDK 7.0.3+ into your application, as outlined here.
Learn more about the impression level revenue (ILR) via SDK feature and pre-requisites.

Implement the ImpressionData Listener

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 will provide you with information about all ad units, and you’ll be able 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);

LevelPlay SDK will notify your listener of the success post-backs, related to impression data. The onImpressionSuccess is described below:

abstract class LevelPlayImpressionDataListener {
   void onImpressionSuccess(LevelPlayImpressionData impressionData);
}

Integrate the ILR data

Once you implement the ImpressionDataListener, you’ll be able to use the impression data and to send it to your own proprietary BI tools and DWH, or to integrate it with 3rd party tools.

Note:  The returned data might include null values. Make sure to add protections before assigning the data, to avoid potential crashes.

To make it easy to use, you can refer to each field separately, or get all information using the allData method:

@override
void onImpressionSuccess(LevelPlayImpressionData impressionData) {
   // use the LevelPlayImpressionData object 
}

Check out the full list of available ILR data, including field description and types, here.