Impression Level Data - cleveradssolutions/CAS-Flutter GitHub Wiki
:zap: Before you start
Make sure you have correctly Initialize CAS.
CleverAdsSolutions enables you to access detailed information for each impression through the impressions callback APIs. The information includes, for example, which demand source served the ad, the expected or exact revenue associated with it. In addition, it contains granular details to allow you to analyze and, ultimately, optimize user acquisition strategies.
Ad Impression
AdStatusHandler
is an interface for getting detailed information about the current ad impression, such as revenue and ad creative details.
Each ad format has a callback to receive an AdImpression
about the current impression.
The code below demonstrates how to handle impression events for Interstitial ad and Banner ad:
@override
void onImpression(AdImpression? adImpression) {
// Get ad details using impression parameter
}
Ad revenue
Use the cpm
property to get a revenue estimate for the current impression.
The value of the cpm
property is Cost Per Mille estimated impressions. To earn per impression revenue, follow these steps:
double cpm = adStatusHandler.cpm;
double revenue = cpm / 1000;
You can also check the precision estimate for the cpm
value, as shown in the following example:
PriceAccuracy precision = adImpression.priceAccuracy);
if (precision == PriceAccuracy.FLOOR) {
// The value is minimum eCPM, obtained from the ad network waterfall configuration.
} else if (precision == PriceAccuracy.BID) {
// The value is exact and committed per 1000 impressions
} else{
// The value is not disclosed by the demand source. getCpm() will return 0.
}
Ad creative
You can also retrieve information about the current ad (such as its mediated network and creative ID), and you will be able to report creative issues for that ad to our Ad review team.
AdType placementType = adImpression.adType;
String? creativeId = adImpression.creativeIdentifier;
String networkName = adImpression.newtork;
String networkSDKVersion = adImpression.versionInfo;
String casUnitId = adImpression.identifier;
adStatusHandler.creativeIdentifier
may return null.
User ad summary
CAS count the number of ad impressions and the total revenue of all formats at the time of a new impression.
int totalImpressions = adImpression.impressionDepth;
double totalRevenue = adImpression.lifeTimeRevenue;
Progress is saved between sessions until the user clears your app's data.
Automatic collect ad revenue
The CleverAdsSolution SDK have feature to automatically logs the ad_impression event whenever your users see an ad impression. Optionally, the alternative event name can be CAS_Impression
.
⭐ Contact support for details of enabling automatic logs the events to Google Analytics from your CAS application.