Life Time Value (LTV)

When an impression occurs, the Google Mobile Ads SDK calls the paid event handler with its associated revenue data. By implementing this handler, you can use the data to calculate a user's life time value, or forward the data downstream to other relevant systems.

This guide is intended to help you implement LTV data capture in your Android app.


Implementing paid event handler

Each ad format has an OnPaidEventListener. During the lifecycle of an ad event, the Google Mobile Ads SDK monitors paid events and invokes the handler with an earned value.

The code below demonstrates how to handle paid events for a rewarded ad:


public class MainActivity extends Activity {
  private RewardedAd mRewardedAd;
  private final String TAG = "MainActivity";

  protected void onCreate(Bundle savedInstanceState) {

    AdRequest adRequest = new AdRequest.Builder().build();

    RewardedAd.load(this, "ad unit ID",
      adRequest, new RewardedAdLoadCallback(){
        public void onAdLoaded(@NonNull RewardedAd rewardedAd) {
          mRewardedAd = rewardedAd;
          // Set paid event listener
          mRewardedAd.setOnPaidEventListener(new OnPaidEventListener() {
            public void onPaidEvent(AdValue adValue) {
              // TODO: Send the paid event information to your preferred
              // analytics server directly within this callback.
              Log.d("MyApp", String.format(
                "Paid event of value %d microcents in currency %s of precision %s%n occurred for ad unit %s from ad network %s.",

Implementation best practices

  1. Set the listener immediately once you create or get access to the ad object, and definitely before showing the ad. This ensures you don't miss any paid event callbacks.
  2. Send the paid event information to your preferred analytics server immediately at the time the onPaidEvent() method is called. This ensures you don't accidentally drop any callbacks and avoids data discrepancies.


AdValue is a class that represents the value earned per paid event, including the value's currency code and its precision type encoded as below.

PrecisionType Description
UNKNOWN An ad value that's unknown. This gets returned when LTV pingback is enabled but there isn't enough data available.
ESTIMATED An ad value estimated from aggregated data.
PUBLISHER_PROVIDED A publisher provided ad value, such as manual CPMs in a mediation group.
PRECISE The precise value paid for this ad.