You can use Firebase Predictions to identify users who are likely to disengage from your app, and apply a push notification campaign to try to retain those users. For example, using the Notifications composer, you could create a recurring campaign that sends an FCM message with a discount link or even a simple greeting to users who are predicted to stop engaging with your app in the next 7 days.
This guide shows you how you can implement this kind of prediction-based user retention strategy.
Before you begin
Before you can start using predictions in a notifications campaign, you must do the following:
- Use Google Analytics in your app. In particular, you
- Enable Analytics data sharing in the Firebase console.
- Optional: Explicitly log any Analytics events relevant to your app that aren't automatically logged. By logging these events, you can improve the quality of future classifications.
- Have a sufficient number of users. Although Predictions does its best to predict behavior for apps with any size user base, you typically need at least 500 daily active users to have meaningful predictions.
- Set up FCM for your app.
1. Start predicting user churn
First, set up your Firebase project to start predicting which of your users are likely to churn.
In the Firebase console, open the Predictions section. If you haven't already agreed to the Predictions terms of service, do so.
After you have agreed to the terms of service, Predictions will be
enabled for your project. The Predictions section of the
Firebase console allows you to define custom predictions. However, for
predicting re-engagement, you can make use of the built-in
which uses an aggregation of Analytics events to predict whether a user will
return to your app or churn in the next 7 days. These predictions will become
available after you enable Predictions and have logged a few weeks' worth of
2. Define a user segment to target
churn prediction is ready to use, click Explore and use
prediction to define the user segment you want to target with your campaign.
To target your most likely churners, you might use the predefined segment containing users in the 75-100 percentile range. On the other hand, if there's some cost associated with reaching out to users, you could instead exclude users almost certain to churn by targeting a narrower segment—say, the 75-90 percentile range.
3. Create a Predictions-based notification campaign
After you select a user segment, click Next, then select Cloud Messaging and click Continue to go to the Notifications composer. On this page, you can create your notification campaign. The user segment you selected is pre-filled in step 2.
To create the campaign:
Compose your re-engagement message. This message could contain a discount code, updates about new features, or simply a greeting.
If you want to include users of your other apps, add the apps here. Otherwise, just proceed with the pre-filled configuration:
Set a notification schedule. Because notifications are only sent to users who meet a specific condition, you can schedule notifications to be sent daily. By doing so, you can attempt to re-engage users as soon as possible after they are predicted to churn. If you set a frequent notification schedule, be sure to also set a frequency limit so you don't annoy your users and inadvertently make the churn prediction self-fulfilling.
Optional: Specify a custom conversion event if you want the console to show your campaign's performance in greater detail than app-opens.
Optional: Set custom fields or advanced settings for your message. See the FCM docs for your client platform.
After you publish your recurring campaign, FCM starts automatically sending your re-engagement message to users who are predicted to churn in the next 7 days.