Skip to main content
Version: 3.3.4

Ad Revenue Callbacks

Appodeal SDK allows you to get impression-level revenue data with Ad Revenue Callbacks. This data includes information about network name, revenue, ad type, etc.

The impression-level ad revenue data can be used then to share with your mobile measurement partner of choice, such as Firebase, for all supported networks.

If you have integrated Firebase, which is included in Appodeal SDK, using this guide, then ad revenue data will be sent automatically, you can read more about it here.

Minimum Requirements:

Appodeal SDK 3.0.1+

Callback Implementation

  1. Subscribe to the Ad Revenue event using one of the options from this guide.
  2. You can use callbacks as shown below:
public void SomeMethod()
{
AppodealCallbacks.AdRevenue.OnReceived += (sender, args) => {};
}

Admob Notice

To get impression-level ad revenue from Admob you also need to turn on the setting in your AdMob account.

Go to your Admob Account SettingsAccount → turn on Impression-level ad revenue toggle.

Appodeal Ad Revenue Description

AppodealAdRevenue - represents revenue information from the ad network.

ParameterTypeDescription
NetworkNameStringThe name of the ad network
DemandSourceStringThe demand source name and bidder name in case of impression from real-time bidding
AdUnitNameStringUnique ad unit name
PlacementStringAppodeal's placement name
RevenueDoubleThe ad's revenue amount or 0 if it doesn't exist
AdTypeStringAppodeal's ad type as string presentation
CurrencyStringCurrent currency supported by Appodeal (USD) as string presentation
RevenuePrecisionStringThe revenue precision
Revenue Precision options
  1. exact - programmatic revenue is the resulting price of the auction
  2. publisher_defined - revenue from cross-promo campaigns
  3. estimated - revenue based on ad network price floors or historical eCPM
  4. undefined - revenue amount is not defined

Use Case

Please remember:

If you have integrated analytics for example Firebase using this guide with Appodeal, then no additional steps are required.

In case you are using your own analytics in the project, please find the example below:

#region IAdRevenueListener implementation

public void OnAdRevenueReceived(AppodealAdRevenue ad)
{
//AppsFlyer
var dict = new Dictionary<string, string>();
dict.Add("AdUnitName", ad.AdUnitName);
dict.Add("AdType", ad.AdType);
AppsFlyerAdRevenue.logAdRevenue(ad.NetworkName,
AppsFlyerAdRevenueMediationNetworkType.AppsFlyerAdRevenueMediationNetworkTypeAppodeal,
ad.Revenue, ad.Currency, dict
);

//Adjust
AdjustAdRevenue adRevenue = new AdjustAdRevenue(AdjustConfig.AdjustAdRevenueSourcePublisher);
adRevenue.setRevenue(ad.Revenue, ad.Currency);
adRevenue.setAdRevenueNetwork(ad.NetworkName);
adRevenue.setAdRevenueUnit(ad.AdUnitName);
Adjust.trackAdRevenue(adRevenue);

//Firebase
Firebase.Analytics.FirebaseAnalytics.LogEvent(
Firebase.Analytics.FirebaseAnalytics.EventAdImpression,
new Firebase.Analytics.Parameter(
Firebase.Analytics.FirebaseAnalytics.ParameterAdPlatform, "Appodeal"),
new Firebase.Analytics.Parameter(
Firebase.Analytics.FirebaseAnalytics.ParameterAdFormat, ad.AdType),
new Firebase.Analytics.Parameter(
Firebase.Analytics.FirebaseAnalytics.ParameterAdSource, ad.NetworkName),
new Firebase.Analytics.Parameter(
Firebase.Analytics.FirebaseAnalytics.AdUnitName, ad.AdUnitName),
new Firebase.Analytics.Parameter(
Firebase.Analytics.FirebaseAnalytics.AdCurrency, ad.Currency),
new Firebase.Analytics.Parameter(
Firebase.Analytics.FirebaseAnalytics.Value, ad.Revenue)
);
}

#endregion