Starting DT Exchange SDK version 7.5.0 you can access detailed information for each impression. The information includes, for example, which demand source served the ad and the expected or exact revenue associated with it. In addition, it contains granular details to allow you to analyze and, ultimately, optimize both your ad monetization and user acquisition strategies.
Glossary Table
Property Name | Type | Description | Examples |
---|---|---|---|
advertiserDomain | String | Advertiser’s domain when available. Used as an identifier for a set of campaigns for the same advertiser | homedepot.com |
campaignId | String | Campaign ID when available used as an identifier for a specific campaign of a certain advertiser | 1860_79463ca93f1dbc4446a5a8db8520f32 |
creativeId | String | Creative ID when available. Used as an identifier for a specific creative of a certain campaign. This is particularly useful information when a certain creative is found to cause user experience issues | 169493819 |
country | String | Country location of the ad impression(in ISO country code) | US |
impressionId | String | A unique identifier for a specific impression | 5699232551401720289 |
demandSource | String | Demand Source name is the name of the buy-side / demand-side entity that purchased the impression. When mediated networks win an impression, you’ll see the mediated network’s name. When a DSP buying through the programmatic marketplace wins the impression, you’ll see the DSP’s name. | Liftoff RTB |
pricing | Object, Non-Null | Object which includes two properties about the impression’s pricing - net payout and currency | - |
Pricing.value | double | The impression’s net payout value | 1.32323232 |
Pricing.currency | String | The impression’s currency type | USD |
video | Object, Nullable | Object which includes two properties about the video - Duration and skippable Please note that this object will be null for non-video impressions. |
- |
Video.skippable | boolean | An indication Whether the video is skippable or not | true/false |
Video.duration | long | The duration of the video in seconds | 15 |
Examples and Snippets
Set out below are some examples and snippets.
Receiving Per-Ad Impression Data
All unit controllers provide you access to the ImpressionData object through their callback APIs, using an Event Listener subclass with a suffix of “WithImpressionData”.
The example below showcases how you can access these data on a full screen placement integration:
Java Example
InneractiveAdViewUnitController controller = (InneractiveAdViewUnitController)bannerSpot.getSelectedUnitController();
controller.setEventsListener(new InneractiveAdViewEventsListenerWithImpressionData() {
@Override
public void onAdImpression(InneractiveAdSpot adSpot, ImpressionData impressionData) {
Log.v("ImpressionData", impressionData.toString());
}
//… all other callbacks and methods
});
Java
InneractiveFullscreenUnitController fullscreenUnitController = (InneractiveFullscreenUnitController)fullScreenSpot.getSelectedUnitController();
fullscreenUnitController.setEventsListener(new InneractiveFullscreenAdEventsListenerWithImpressionData() {
@Override
public void onAdImpression(InneractiveAdSpot adSpot, ImpressionData impressionData) {
Log.v("ImpressionData", impressionData.toString());
}
//… all other callbacks and methods
});
Receiving Impression Data Globally
In addition to the per-ad callback, this listener also contains details about the relevant Placement ID (spot ID) and Unit ID.
void OnGlobalImpressionDataListener.onImpression(String spotId, String unitId, ImpressionData impressionData);
Caution
The static impression data listener is kept statically in a hard reference which might cause memory leaks, if used incorrectly.
It is recommended to use the relevant InneractiveAdManager.clearImpressionDataListener()
method when you no longer require receiving application-wide ad impression data.
Usage Example
InneractiveAdManager.setImpressionDataListener(new OnGlobalImpressionDataListener() {
@Override
public void onImpression(String spotId, String unitId, ImpressionData impressionData) {
Log.v(“impressionStaticData” , "spotId : " + spotId + ", unitId: " + unitId + ", impressionData: " + impressionData);
}
});