When Firebase brought in its new version, it promised to smoothen operations and add features! And it did in abundance. It made developers code creative, supported marketers to enhance conversations, business developers to think more proactively. The improvements allowed more users to engage and enhanced the user experience.
Now, with Firebase it’s a breeze to update app behavior and appearance of apps without requiring users to download an app update.
Firebase A/B Testing helps you optimize your app experience by making it easy to run, analyze, and scale product and marketing experiments. It gives you the power to test changes to your app’s UI, features, or engagement campaigns to see if they actually move the needle on your key metrics (like revenue and retention) before you roll them out widely.
Before Firebase, content experiment and value collection variables of Google Tag Manager were used for basic A/B testing. In 2018, content experiment deprecated and major customization in mobile applications became a pain point. In came Firebase latest version. Today with Firebase’s powerful features, A/B test configuration is very much possible via server-side configuration.
Capabilities / Features
- Test and improve your product experience
- Re-engage users with Notifications
- Rolling out new features after experiments
- Retarget users with Google Analytics data
- Track various metrics with respect to experiment
Ways to implement A/B tests in Firebase
1. Remote Configuration
Firebase Remote Config is a cloud service that lets you change the behavior and appearance of your app without requiring users to download an app update.
It allows to access A/B test parameters remotely and is useful to change the configuration. It ensures that the tester can run an experiment from server-side configurations and engage more users with minimal code.
Reaching out to users via notifications and analyzing how notifications lead to engaging more users and tend to accomplish desired goals within the app.
Notifications allow app users to spend more time inside the app and make purchases that will lead to a higher conversion rate. Send a message to the right user at the right moment.
Variations of notifications can be configured and the performance of each variant can be measured with respect to different metrics.
3. In-App Messaging
Firebase In-App Messaging lets you evaluate multiple variants of a single in-app message.
Firebase In-App Messaging 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.
Set up Remote Config in Android Application
Step 1: Add Firebase and the Remote Config SDK to your app
Install Firebase and Remote Config to your app – Check out our other blog for Android.
Add the following dependency with the latest version to your app level build.gradle file:
Step 2 : Get the Remote Config singleton object
Get a Remote Config object instance and set the minimum fetch interval to allow for frequent refreshes.
The singleton object is used to store in-app default parameter values. Fetch updated parameter values from the backend, and control when fetched values are made available to your app.
It’s recommended to set a relatively low minimum fetch interval.
Step 3 : Set in-app default parameter values
You can set in-app default parameter values in the Remote Config object. It ensures that your app behaves as intended before it connects to the Remote Config backend. And default values are available if none are set in the backend.
a) Define a set of parameter names and default parameter values using a Map object or an XML resource file stored in your app’s res/xml folder. The Remote Config quickstart sample app uses an XML file to define default parameter names and values.
b) Add these values to the Remote Config object using setDefaultsAsync(int), as shown:
Step 4 :- Fetch and activate values
For cases where you want to fetch and activate values in one call, you can use a fetchAndActivate() request to fetch values from the Remote Config backend and make them available to the app:
Set up Remote Config in Firebase console
1. Go to Remote Config inside Engage section of the Firebase console.
Context of Experiment:
Here, you’ll have an app with CLICK ME as a label on the button. You can change its background color with a firebase A/B testing experiment.
2. Provide Parameter key and its corresponding value.
3. Define parameter key. It allows you to assign a value to the parameter key in various formats.
4. Directly assign the default value as showcase in the screenshot below.
5. Define condition. This step is optional and enables users to fall in variants that satisfy specific conditions. Click “Conditional value”, to add conditions based on the App version, OS type, Device language, User property and many more..
Type of condition: Conditions can be defined based on user properties (if any): user in random percentile, Platform, App Language, and such.
6. After adding the parameters, ensure to publish the changes by clicking “Publish changes” to make parameters available in the app via server.
It’s a mighty easy platform Firebase has provided. You can perform A/B testing in mobile apps with minimal efforts and better results. At present, these features are supported in it’s beta version. So you can share your feedback and experience to make the app more useful.
This is the first part in the series to guide you through set and Testing! Part 2 Tatvic Analytics will help you with – How to Set Configure A/B testing.