Guides

A/B testing

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.

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.

For example:

VariantDistributionNumber range
Variant A50%0 - 50
Variant B40%50 - 90
Variant C10%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.

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.

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.

info

This code requires the following:

  1. The Uniform tracker is added to the front-end application.
  2. Manifest has an A/B test with the id dxcpTest.

You can define event handlers for the events that are emitted from the Uniform tracker during the testing process.

Coming soon

  1. In Uniform, navigate to the Optimization > 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.

note

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.

info

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.

    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.

    info

    Next steps Next you must configure a test on a 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 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.

  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:

  6. Save the composition.

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

    tip

    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.

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.

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

  2. Select the test component (that is, 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 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).

  4. After you make changes, save the composition.

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