A/B Testing in Flutter using Unleash and Mixpanel
This article is a contribution by Ayush Bherwani as a part of the Community Content Program. You can also suggest a topic by opening an issue, or Write for Unleash as a part of the Community Content Program.
After successfully integrating the first feature flag in the Unsplash sample app, let’s talk about how you can use Unleash to perform experimentation, also known as A/B testing, in Flutter to ship features more confidently.
For this article, we’ll integrate feature flags for A/B testing to experiment with “like image” feature user experience. As an overview, the app is quite simple, with two screens displaying images and image details respectively. The behavior of the “image details” feature is controlled through an Unleash instance. For those who want to skip straight to the code, you can find it on GitHub.
Here’s a screenshot of the application:
Setup variants in Unleash
In your Unleash instance, create a new feature flag called likeOptionExperiment
. Choose the flag type called Experiment
and enable the impression data. By default, the flag will be set to false.
Now that you have created your feature flag, let’s create two new variants gridTile
and imageDetails
respectively. These variants will help you position your like image button.
Below is a screenshot of experimentation in action based on the likeOptionExperiment
flag and corresponding variants.