A/B Testing #
Experiments are explored in the Experimenting with Audiences guide, however this guide shows how to use Experiments and Metrics specifically to run A/B tests in your game and analyze the results.
To achieve this you will do the following:
- Create an event
- Create a metric
- Create an experiment
- Define the variants
- Define the phase
- Have the client participate in the experiment
- Analyze the results
This example demonstrates the classic “purchase button color” A/B test where users are presented with a button that is either green or blue, and metrics are then used to analyze which color button resulted in more clicks.
Create an event #
Create an event that will be triggered by the client whenever the purchase button is clicked.
- Navigate to Settings -> Events.
- Click Create New Event.
- For Event Name, type
purchaseButtonClicked
. - Leave the Type as
string
.
Create a metric #
Create a metric that will be used to count the number of time the purchaseButtonClicked
event occurs.
- Navigate to Metrics.
- Click New Metric.
- For Name, type
purchaseButtonClicked
and give it an appropriate Description.
- For Type, choose
Count
. - For Order leave it as
High
.
Create an experiment #
Create an experiment that will be used for A/B testing the different button colors.
- Navigate to the Experiments screen.
- Click Create New Experiment.
- For Name, type
PurchaseButtonColorExperiment
and provide a meaningful Description. - For Audience, select
ALL
. - For Goal Metric, select
purchaseButtonClicked
.
Defining the variants #
Create two new variants: green
and blue
.
- Click on the Variants tab.
- Click Create New Variant.
- For Name enter
blue
and for Value enterblue
. - Click Create.
- Repeat steps 2-4 to create a second variant with the name
green
and valuegreen
.
Defining the phase #
Create a new phase that will last for 1 week and have a 50/50 split between blue
and green
values for participants.
- Navigate to the Phases tab.
- Click Create New Phase.
- For Phase Name enter
PhaseOne
and provide a meaningful Description. - Under Variant, enter a Split % value of
50
for both theblue
andgreen
variants. - For Start Date enter the date and time you want the phase to start.
- For End Date enter the date and time you want the phase to end.
Client participation #
For the experiment to be valuable, players must take part in it by first receiving the value, updating the game UI accordingly and then triggering the appropriate event when the player clicks the purchase button.
Getting the experiment value and updating the UI
|
|
Triggering the event when button is clicked
|
|
Analyzing the results #
When the experiment is over you can view the resulting metrics by expanding the Phase you wish to view. This will provide all the Phase details including the start/end date and the configured variant split, metrics results and participants list.
The Goal Metrics section will display the counts of how many users received each variant specifically, as well as (for Count metrics) a breakdown of how many users sent an event after receiving the result.
You can see in the screenshot below that half the users received the control
variant and half the users received the expensive
variant (which matches the 50/50 split that was defined). You can see in the Goal Metrics section, which variant group impacted our goal metric of increased revenue more positively.
There are many different kinds of metrics you can experiment with. For a more detailed breakdown of these please see the Metrics page.