-
Notifications
You must be signed in to change notification settings - Fork 4
Impression Level Data
⚡ 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.
AdMetaData
is an class 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:
manager.GetAdView(AdSize.Banner).OnImpression += (view, impression) =>
{
// Get ad details of Banner Ad using impression parameter
}
manager.OnInterstitialAdImpression += (impression) =>
{
// Get ad details of Interstitial Ad using impression parameter
}
manager.OnRewardedAdImpression += (impression) =>
{
// Get ad details of Rewarded Ad using impression parameter
}
The revenue generated for the impression (USD). The revenue value is either estimated or exact, according to the priceAccuracy
property.
double revenue = impression.revenue;
You can also check the precision estimate for the revenue
value, as shown in the following example:
PriceAccuracy precision = impression.priceAccuracy;
if (precision == PriceAccuracy.Floor) {
// The estimated revenue, can also be a minimum price (floor) for ad impression.
} else if (precision == PriceAccuracy.Bid) {
// The revenue provided as part of the real-time auction.
} else{
// The revenue is '0', when the demand source does not agree to disclose the payout of impression.
}
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 = impression.adType;
string creativeId = impression.creativeIdentifier;
string networkName = impression.network;
string networkSDKVersion = impression.versionInfo;
string casUnitId = impression.identifier;
impression.creativeIdentifier
may return null.
A list of all supported networks can be found in AdNetwork
class. For example:
if (networkName == AdNetwork.Vungle) {
// Impression from Vungle network.
}
CAS count the number of ad impressions and the total revenue of all formats at the time of a new impression.
int totalImpressions = impression.impressionDepth;
double totalRevenue = impression.lifetimeRevenue;
Progress is saved between sessions until the user clears your app's data.
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.
The following code shows an implementation example for log AD_IMPRESSION
event to Google Analytics.
if (impression.priceAccuracy == PriceAccuracy.Undisclosed)
{
return;
}
Firebase.Analytics.Parameter[] AdParameters = {
new Firebase.Analytics.Parameter("ad_platform", "CAS"),
new Firebase.Analytics.Parameter("ad_source", impression.network),
new Firebase.Analytics.Parameter("ad_unit_name", impression.identifier),
new Firebase.Analytics.Parameter("ad_format", impression.adType.ToString()),
new Firebase.Analytics.Parameter("currency", "USD"), // All CAS revenue is sent in USD
new Firebase.Analytics.Parameter("value", impression.revenue)
};
Firebase.Analytics.FirebaseAnalytics.LogEvent("ad_impression", AdParameters);
- Project Setup
- Configuring SDK
- Include Android
- Include iOS
- Additional mediation steps
- App-ads.txt🔗