Leanplum's user guides and developer documentation.

Leanplum Documentation

Leanplum's user guides, SDK setup, API docs, and more resources are here to help you get the most out of A/B testing, Campaigns, Messaging, and Analytics.

App review request

iOS 10.3+


Before you begin (iOS 10.3+)

In order to send the new iOS app review request, which appears inside your app, you must complete the updates and steps outlined in this article.

After completing the required setup steps linked above, you can use your tracked events and other triggers in Leanplum to present the app review prompt to your users (running iOS 10.3+) at just the right time. You can — of course — segment this and A/B test it with a Holdback to find the most effective time to ask users to rate your app.



Per Apple's documentation, you can only prompt a user to review your app, at most, three times a year (365 days). iOS has complete control over whether to display the prompt to the end user. And, in iOS11, Apple has added a new "In-App Ratings & Reviews" toggle that allows users themselves to disable App Review prompts. It's entirely possible, then, that iOS may not display the prompt to a user, even if we request it.

Given that the App Review prompt may not be displayed by iOS (and iOS does not currently give any indication in its APIs if it displayed the prompt), we highly recommend using an in-app message as a "pre-permission" for an App Review.

Note that Apple does not make visible if the user was shown the rating prompt nor if they interacted with it. For this reason, we are not able to provide analytics on the Request App Rating prompt — only the Leanplum "pre-permission" prompt.

Here's how to send a pre-permission that triggers the App Review prompt:

  1. Start a new message in the Message Composer.
  2. Select the Confirm template from the in-app message dropdown.
  1. Edit the Title and Message fields. We highly recommend using a generic message like "Do you like this app?" with "Yes/No" options, since iOS may not display the iOS App Review (if the user disabled it, or if iOS determines not to display it).
  2. Set the Accept Action to Request App Rating.
  1. Edit the Targets to determine which of your users will get the review prompt.


The 10.3+ system prompt shouldn’t display on devices with iOS 10.2 and below, but the confirm message you send before the prompt may go to any users in your Target audience. Target users on iOS 10.3 and above to prevent other users from receiving a confirm message that doesn't lead to the prompt.

To send a review request to users with iOS 10.2 and below, target those users with a separate review request.

  1. Edit the Display when settings to determine when this message will be displayed to these users.

Android 5.0+

App Rating for Android is implemented using the In-App Review API of the Play Core SDK.

To set up your project for app rating you need to copy a source file to your codebase and call AppRating.register() method before calling Leanplum.start:

package com.leanplum.customtemplates;

import android.app.Activity;
import com.google.android.play.core.review.ReviewInfo;
import com.google.android.play.core.review.ReviewManager;
import com.google.android.play.core.review.ReviewManagerFactory;
import com.google.android.play.core.tasks.Task;
import com.leanplum.ActionArgs;
import com.leanplum.ActionContext;
import com.leanplum.Leanplum;
import com.leanplum.LeanplumActivityHelper;
import com.leanplum.callbacks.ActionCallback;
import com.leanplum.callbacks.PostponableAction;

 * Registers a Leanplum action that show the app rating flow for Google Play Store.
public class AppRating {

  private static final String ACTION = "Request App Rating";

  public static void register() {
        new ActionArgs(),
        new ActionCallback() {
          public boolean onResponse(ActionContext context) {
                new PostponableAction() {
                  public void run() {
            return true;

  private static void requestAppRating() {
    Activity activity = LeanplumActivityHelper.getCurrentActivity();
    if (activity == null || activity.isFinishing())

    ReviewManager manager = ReviewManagerFactory.create(activity);
    Task<ReviewInfo> request = manager.requestReviewFlow();

    request.addOnCompleteListener(requestTask -> {
      if (!requestTask.isSuccessful()) {
        // There is a problem. Probably Google Play Store is missing.
        // If you need the exception call requestTask.getException().

      Task<Void> flow = manager.launchReviewFlow(activity, requestTask.getResult());
      flow.addOnCompleteListener((reviewTask) -> {
        // The flow has finished. The API does not indicate whether the user
        // reviewed or not, or even whether the review dialog was shown.

Include the dependency for the Play Core Library into your Android project's Gradle file:

// In your app’s build.gradle file:
dependencies {
    // This dependency is downloaded from the Google’s Maven repository.
    // Ensure you also include that repository in your project's build.gradle file.
    implementation 'com.google.android.play:core:1.8.2'


Supported devices according to Google documentation

  • Android devices (phones and tablets) running Android 5.0 (API level 21) or higher that have the Google Play Store installed
  • Chrome OS devices that have Google Play Store installed

To send an app rating:

  1. Create new in-app message and select the Confirm template.
  1. Set up the message's title and text with your custom rating request, and change the text of the Accept and Cancel buttons to fit your rating message.
  2. Set the Accept Action to Request App Rating.
  1. Edit the Targets to determine which of your users will get the review prompt.
  2. Edit the Display when settings to determine when this message will be displayed to these users.

iOS 10.2 and earlier

To send an app review request for iOS 10.2 and earlier or Google Play (Android app store), create a new in-app message and select the Confirm template.

Set up the message's text with your custom rating request, and change the text of the Accept and Cancel buttons to fit your rating message.

Set the Accept action to "Open URL" and paste in the link to your app's review page in the App Store. The cancel action should be "No action," or you can chain to another message or link asking for additional feedback.


If you are also Sending an app review request for users on iOS 10.3+) with the new app review prompt, make sure the 10.3+ message's target includes 'iOS version 10.3 and above.' Also make sure your target for the 10.2 message includes 'iOS version 10.2 and below.' This will prevent users on different versions from receiving conflicting or duplicate versions of the same message.

For an example of an effective app review request message flow, see Get more five-star app ratings.

Updated 22 days ago

App review request

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.