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 in Step 2.

Minimum Requirements:

  • Appodeal SDK 3.0.1+

Callback Implementation

Appodeal.setAdRevenueCallbacks(new AdRevenueCallbacks() {
  public void onAdRevenueReceive(RevenueInfo revenueInfo) {
    // Called whenever SDK receives revenue information for an ad

All callbacks are called on the main thread.

Revenue Info Description

RevenueInfo - represents revenue information.



The name of the ad network is guaranteed not to be null.
demandSourceStringThe demand source name and bidder name in case of impression from real-time bidding, guaranteed not to be null.
adUnitNameStringUnique ad unit name guaranteed not to be null.
placementStringAppodeal's placement name is guaranteed not to be null.
revenueDoubleThe ad's revenue amount or 0 if it doesn't exist.
adTypeIntAppodeal's ad type.
adTypeStringStringAppodeal's ad type as string presentation.
platformStringAppodeal's platform name.
revenueCurrencyRevenueCurrencyCurrent currency supported by Appodeal (USD).
currencyStringCurrent currency supported by Appodeal (USD) as string presentation.

The revenue precision, which can be:
1. 'exact' - programmatic revenue is the resulting price of the auction

2. 'publisher_defined' - revenue from crosspromo campaigns
3. 'estimated' - revenue based on ad network pricefloors or historical eCPM
4. 'undefined' - revenue amount is not defined

Use Сase

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:

  public void onAdRevenueReceive(RevenueInfo revenueInfo) {
// Appsflyer
	Map<String, String> customParams = new HashMap<>();
	customParams.put(Scheme.AD_UNIT, revenueInfo.getAdUnitName());
	customParams.put(Scheme.AD_TYPE, revenueInfo.getAdTypeString());              

// Adjust
	AdjustAdRevenue adRevenue = new AdjustAdRevenue("Appodeal")
		adRevenue.setRevenue(revenueInfo.getRevenue(), revenueInfo.getCurrency());

// Firebase
	Bundle bundle = new Bundle();
		bundle.putString(FirebaseAnalytics.Param.AD_PLATFORM, revenueInfo.getPlatform());
		bundle.putString(FirebaseAnalytics.Param.SOURCE, revenueInfo.getNetworkName());
		bundle.putString(FirebaseAnalytics.Param.AD_FORMAT, revenueInfo.getAdTypeString());
		bundle.putString(FirebaseAnalytics.Param.AD_UNIT_NAME, revenueInfo.getAdUnitName());
		bundle.putString(FirebaseAnalytics.Param.CURRENCY, RevenueInfo.getCurrency());
		bundle.putString(FirebaseAnalytics.Param.VALUE, RevenueInfo.getRevenue());
	mFirebaseAnalytics.logEvent(FirebaseAnalytics.Event.AD_IMPRESSION, bundle);