Welcome back to the Firebase quadrilogy. We have been learning a lot about Firebase through our 4-part series! Firebase enables you to perform A/B testing in mobile apps with minimal effort and better results.
A/B Testing In Mobile Apps – Notifications
The app analyzes notifications to increase user engagement. Its primary focus is to accomplish the app’s goals. The notifications act as a bridge between the users and the app to determine its effectiveness towards the end goals.
They allow app users to spend more time inside the app and make purchases. This leads to a higher conversion rate. The only requirement is:
“Send a message to the right user at the right moment.”
Personalizations via notifications are possible to ensure users constantly engage with mobile applications.
Below is the step by step guide to implementing Personalization via Notifications:
Setup Notification in Android Application
1. Add Cloud messaging dependency to app-level build.gradle file. Use the latest sdk version.
2. To implement Firebase notification, import FirebaseMessaging library in Java file
3. After creating the class, this step is mandatory to allow the notification service to be active when the app is in the background. Add service class which is created in the above step.
4. This step is Optional. It allows users to set a default notification icon and color.
Setup Notification in Firebase Console
A simple step-by-step directive to set up notification in Firebase Console:
1. Sign in to the Firebase console: In the Engage section, select AB testing. Click on Create Experiment. Select In-App Messaging from pop up.
2. Add experiment: Enter name, description, target users and other requisite details. Click Next.
Condition to Target Users: In Notification A/B test, there are various conditions to isolate users whom you want to send notification for app engagement. Such as App ID, User audiences (It allows to choose all users, purchasers, or any custom that are created), user properties, etc.
3. Define Variants: Add messages that should be displayed to target users through multiple variants or you can prefer original text. Click Next.
4. Define Goal: Do the users fall under a variant or original, which goal should you consider for accomplishment?
Goal types and metrics are the same as set in remote config. One new event Notification opens and a metric is added to better measurement.
5. Send Now or Schedule: Selecting Message option allows you to select either Send Now or to be Scheduled for the specific time to send notification.
Let’s explore Advanced Message Options:
a. Advanced options: Some advanced configurations can be set to send notifications with dynamic data.
b. Title: The notification title that is shown on Android devices and Apple watchOS devices.
c. Custom data: A set of key-value pairs that is delivered to the app along with the notification.
d. Android Notification Channel: It provides the ability to group the notifications that our application sends into manageable groups. By default, it will be blank
e. Sound: Disabled or Enabled
f. Expires: An interval that determines how long the message is kept for redelivery
6. Click on Review.
7. Test the Experiment: Access the device registration token. FCM SDK generates a registration token for the client app instance using that we are allowed to target single or multiple devices at once.
8. Post Testing Completion: Review the experiment and start it. Analyze the results for a few days. Here is a sample notification of our A/B test that Firebase has sent to all users who fall into the variant.
Firebase A/B Testing in Mobile Apps lets you evaluate multiple variants of a In-App Messaging.
It helps you engage your app’s active users by sending them targeted, contextual messages that encourage them to use key app features.
For Example, you could send an in-app message to get users to subscribe, watch a video, complete a level, or buy an item. You can customize messages as cards,
banners, modals, or images, and set up triggers so that they appear exactly when they’d benefit your users most.
Setup In-App Messaging in Android Application
1. Add Firebase SDK & In App Messaging Library in android app as shown below.
2. Sign in to the Firebase console
In the Engage section, select In-App Messaging. Click Create Experiment. Select Notifications from pop up.
3. Add Experiment name & its description as shown below
4. Add banner details, button text, image url, etc in baseline & other variant models.
Create a card-like structure which will be visible to the users inside the app.
5. Add details for targeting users in apps.
6. Add Goals to experiment.
Select Primary metric to decide a leader / winner for variants shown to users. Add additional secondary metrics to compare the numbers for multiple variants in A/B Test experiment.
7. Schedule In-App Messaging.
You can schedule In-App Messages or send it on the go as well. Additionally, you can mention the end date on the console to automatically stop the campaign for all users.
Add activation conditions for In-App Messages for users who have triggered that event.
For example, below we have shown a button_click as an activation event for In-App Messages to be displayed to users.
8. Click on Review
9. Test In-App Messages
Now we can test the In-App Messages as well in testing devices with the help of Instance ID token or FIS auth token. We have shown below the same for reference. Add testing device token & save that.
For sample, we have shown below two variants of configured In-App Messaging Banners.
10. Post verification in the testing device. Click on Start Experiment to make this experiment live.
On a Closing Note
Firebase has proved to be a crucial addition to enhance In-App messaging capabilities. You can perform A/B testing in notifications with quick and accurate results.
So, how has your experience been so far? Drop your feedback and experiences below and we will reach out to you!
This is the third part in the series to guide you through Firebase A/B Testing in Mobile Apps! Part 4 will help you with – How to Set Configure A/B testing.