Skip to main content

A/B testing

Activate A/B testing

If you are using Uniform Canvas, A/B testing is handled automatically. However, if you are not 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:

  1. The Uniform tracker is added to the front-end application.
  2. Manifest has an A/B test with the id dxcTest.
import { Test } from '@uniformdev/context-react';

const variants = [
{ text: 'Digital Experience Composition (DXC) helps business users and developers collaborate better.' },
{ text: 'Business users need better tools to collaborate with developers.' },
{ text: 'Developers can work smarter when business users have the proper tools.' },

export function DxcTest() {
return (

function ContentBlock({ text }) {
return (
{ text }

Handle tracker events

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

Test result


Coming soon.