Skip to main content

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.

tip

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

  1. In Uniform, navigate to the Testing tab.
  2. Click the red (+) button.
  3. Enter the following values:
    FieldDescription
    NameName that describes the test.
    Public IDName that uniquely identifies the test. This value is available to developers.
  4. Click Create.
Next steps

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.

  1. In Uniform, edit a component with the slot that you want to test.

  2. Click Edit Component >.

  3. Navigate to the slot.

  4. In the section Allowed Components, select the component A/B Test.

    component-selected
    This configuration allows Event components to be tested in the slot.
    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.

  5. Click OK.

Next steps

Next you must configure a test on a component.

Configure test on component

  1. In Uniform, edit the composition with the component you want to test.

  2. Select the component you want to test.

  3. Click A/B Test This.

    info

    If this button is not available, you probably did not 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.

  4. Select the parent component. This is the "test component".

    About this step

    This is the component A/B Test.

  5. 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:

    FieldDescription
    Variation NameLabel that describes this variation. It is used in reporting.
    Visitor DistributionBy 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.
  6. Save the composition.

  7. You must publish your composition before the A/B test you've configured is available to the front-end.

Next steps

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.

tip

For more information on visitor distribution, see the section on how A/B testing works.

  1. In Uniform, edit the composition with the component that has testing configured.

  2. Select the test component (i.e. the component with a component type A/B Test).

  3. 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.

    ab-test-parameters
    Three test variants configured with the default visitor distribution.
    About this step

    You 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).

  4. After you make changes, save the composition.

  5. You must publish your composition before the changes are available to the front-end.