A/B testing
Uniform A/B testing is incorporated directly into the composition process. This enables you to add, change and remove tests configured on a composition using Uniform Canvas. No developer is required.
For background information about what A/B testing is and examples of how it is used, see the section that covers the A/B testing capability.
Create test
- In Uniform, navigate to the 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. - Click Create.
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 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.
This configuration allows Event components to be tested in the slot.About this stepYou must have other component types selected on the slot. Those will be the component types that can be tested in this slot.
Click OK.
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.
infoIf this button is not available, you probably did not complete the section where you enable testing on a slot.
About this stepWhen 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 stepThis is the component A/B Test.
Add additional components under the test component.
About this stepIn 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:
Field Description Variation Name Label that describes this variation. It is used in reporting. Visitor Distribution By default (i.e. no value specified), all variations have an equal chance of being displayed. You can set this value to make this variation more or less likely to be displayed. For more information, see the section on how A/B testing works. 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, testing should "just work".
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.
For more information on visitor distribution, see the section on how A/B testing works.
In Uniform, edit the composition with the component that has testing configured.
Select the test component (i.e. 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 stepYou do not 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.