Optimize your experience with A/B tests. Expose changes to some users while showing others the unchanged, original experience. Based on how users engage with the experiences, you can determine if you want to roll the changes out to the rest of the users, or if the original experience performs better.
Uniform gives you the ability to create and control all aspects of A/B tests so you can iterate faster during your digital production process.
How A/B testing works#
A test placement in Uniform is a list of variants that can be selected to be shown to the visitor. Each variant can have specific distribution that allows you to determine what percentage of visitors will see this variant.
To select a test variant, Uniform generates a random number between 0 and 100. This random number determines which variant is shown.
|Variant A||50%||0 - 50|
|Variant B||40%||50 - 90|
|Variant C||10%||90 - 100|
Uniform matches the random number with the corresponding range for the variant. If the number generated was 40, the visitor would see Variant A.
Any effective testing strategy must be measured to make sure it's having a positive effect. To enable this, Uniform enables you to connect its test results to any analytics tool available. Each test placement has a name which is sent to any connected analytics along with the variant that was selected. The resulting data can then be analyzed and reported on in any way the analytics tool allows.
Inside of the Uniform Testing dashboard, you are able to connect the Google Analytics integration and view reporting associated with the test.
Uniform ships with a connector for Google Analytics v4 (gtag), and a generic event-handling interface that adapts to any tool with minimal code.
Choosing a winner#
Once a test has been completed, a winning variant is able to be declared using the Uniform Testing dashboard. Once a winner is declared and has been republished in the dashboard, only the winning variant will be shown to every visitor on the site even if they’ve previously seen a different variant in the past.
Completed tests should periodically be removed with the winning variant directly to avoid building up a large amount of completed tests across the site.
Activate A/B testing#
If you are using Uniform Canvas, A/B testing is handled automatically. However, if you aren't using Canvas, you can still take advantage of testing, you just have to add it to your front-end application yourself.
The following example tests a component.
This code requires the following:
- The Uniform tracker is added to the front-end application.
- Manifest has an A/B test with the id
Handle tracker events#
You can define event handlers for the events that are emitted from the Uniform tracker during the testing process.
Manage A/B testing in Uniform#
In Uniform, navigate to the Optimization > Testing tab.
Click the red (+) button.
Enter the following values:
Field Description Name Name that describes the test. Public ID Name that uniquely identifies the test. This value is available to developers.
A test involves Uniform automatically selecting one component in a slot to be displayed. Testing must be enabled on the slot with the components you want to test.
Enable testing on slot#
Before you start Before you can test a component, you must have a component defined. For information on how to define a component, see the components guide.
In Uniform, edit a component with the slot that you want to test.
Click Edit Component.
Navigate to the slot.
In the section Allowed Components, select the component A/B Test.
About this step
You must have other component types selected on the slot. Those will be the component types that can be tested in this slot.
Next steps Next you must configure a test on a component.
Configure test on component#
In Uniform, edit the composition with the component you want to test.
Select the component you want to test.
Click A/B Test This.
If this button isn't available, you probably didn't complete the section where you enable testing on a slot.
About this step
When you click the button A/B Test This, a new component A/B Test is inserted as the parent of the component you have selected. You use this component to configure how the test affects the component you selected.
Select the parent component. This is the "test component."
About this step
This is the component A/B Test.
Add additional components under the test component.
About this step
In order for a test to do anything, there must be at least two components under the test component. These are called "test variations."
When you add additional components, a new section A/B Test is available. This gives you the ability to specify the following values:
Save the composition.
You must publish your composition before the A/B test you've configured is available to the front-end.
A/B testing is already integrated into Canvas, so there are no front-end code changes you need to make. After you publish your composition, test content should be available right away.
Configure visitor distribution#
When a test is configured, Uniform determines which of the test variants to display. The variants are defined under the "test component." For any visitor, Uniform determines which variant to display. By default, each test variant has an equal chance of being displayed. For example, if there are 4 test variants, each variant has a 25% chance of being displayed. You can change this to make specific components more or less likely to be displayed.
In Uniform, edit the composition with the component that has testing configured.
Select the test component (that is, the component with a component type A/B Test).
In the section A/B Test parameters, there is a list of the test variations. If you want all of the test variants to have an equal chance of being displayed, make sure the checkbox Equal is ticked. This section also enables you to control the visitor distribution for all test variants from one place.Three test variants configured with the default visitor distribution.
About this step
You don't have to set values for all variations. For example, if you have 3 variations and set one of them to 60% and leave the other two empty, Uniform will automatically assign each of those to be 20% (40% remaining divided between two variations).
After you make changes, save the composition.
You must publish your composition before the changes are available to the front-end.