---
url: 'https://dxpr.com/hc/documentation/learn-dxpr-builder/integrations/setting-up-ab-tests'
title: 'Set up an A/B test | DXPR'
author:
  name: docs-sync
  url: 'https://dxpr.com/users/docs-sync'
date: '2026-10-23T14:31:17+00:00'
copyright: 'Copyright DXPR. All rights reserved.'
type: article
summary: 'Create a variant, choose the conversion and start the test'
tags:
  - 'Test variations'
image: 'https://dxpr.com/themes/custom/dxpr_com/images/dxpr-share-card.jpg'
published: true
og:
  site_name: DXPR
  updated_time: '2026-10-23T14:31:17+0000'
  'image:alt': 'DXPR, powered by Drupal: AI-powered Drupal for marketers.'
schema:
  '@context': 'https://schema.org'
  '@graph':
    -
      mainEntity: {  }
    -
      '@type': TechArticle
      headline: 'Set up an A/B test'
      description: 'Create a variant, choose the conversion and start the test'
      image:
        '@type': ImageObject
        url: 'https://dxpr.com/themes/custom/dxpr_com/images/dxpr-share-card.jpg'
        width: '1200'
        height: '630'
      datePublished: '2026-10-23T14:31:17+0000'
      dateModified: '2026-10-23T14:31:17+0000'
      author:
        '@type': Organization
        '@id': 'https://dxpr.com/#organization'
        name: DXPR
        url: 'https://dxpr.com/'
        logo:
          '@type': ImageObject
          url: 'https://dxpr.com/themes/custom/dxpr_com/dxpr-logo-dark.svg'
          width: '1348'
          height: '501'
      publisher:
        '@type': Organization
        '@id': 'https://dxpr.com/#organization'
        name: DXPR
        url: 'https://dxpr.com/'
        logo:
          '@type': ImageObject
          url: 'https://dxpr.com/themes/custom/dxpr_com/dxpr-logo-dark.svg'
          width: '1348'
          height: '501'
      mainEntityOfPage: 'https://dxpr.com/hc/documentation/learn-dxpr-builder/integrations/setting-up-ab-tests'
      articleSection: 'Test variations'
    -
      '@type': WebPage
      '@id': 'https://dxpr.com/hc/documentation/learn-dxpr-builder/integrations/setting-up-ab-tests'
      description: 'Create a variant, choose the conversion and start the test'
      breadcrumb:
        '@type': BreadcrumbList
        itemListElement:
          -
            '@type': ListItem
            position: 1
            name: Home
            item: 'https://dxpr.com/'
      publisher:
        '@type': Organization
        '@id': 'https://dxpr.com/#organization'
        name: DXPR
      inLanguage: en
---
[Help Center](/hc)/[Documentation](/hc/documentation) /[Learn DXPR Builder](/hc/documentation/learn-dxpr-builder) /[Manage the site](/hc/documentation/learn-dxpr-builder/manage) /[Test variations](/hc/documentation/learn-dxpr-builder/integrations/ab-testing-overview) # Set up an A/B test.

Create a variant, choose the conversion and start the test

 Learn DXPR BuilderManage the siteTest variations

   ## In this guide

 Related guides

- [Analysing results](/hc/documentation/learn-dxpr-builder/integrations/analyzing-results)

Try a second version of a headline, a picture or a whole section on a live page. You build version B in the editor, choose what counts as success, and save. From then on each visitor sees one version, and more visitors get the one that works. For three or more versions, continue with [Multivariate testing](/hc/documentation/learn-dxpr-builder/integrations/multivariate-testing).

## Before you start

- The RL module is installed and enabled: `composer require drupal/rl`, then `drush en rl`.
- **RL: rl.php accessibility** on **Reports** &gt; **Status report** (`/admin/reports/status`) says "rl.php is accessible".

## Set up

1. Hover the element you want to test and click **More** on its control bar.
2. Under **A/B testing**, choose **Create variant**.
3. With the **B** pill highlighted, change the text, picture or layout.
4. Click **More** again and choose **Experiment settings**.
5. Pick a **Conversion**, set the **Seconds** or a **CSS selector (optional)**, and click **Save**.
6. Click **Save** on the toolbar to start the test.

## What you see

The control bar now shows the pills **A** and **B**. Click a pill to switch between the versions; your changes to B leave A as it was. Each new variant starts as a copy of the version you are viewing.

Visitors each see one version. To follow the test, open **More** and choose **View A/B test results**: the report opens in a new browser tab. See [Analysing results](/hc/documentation/learn-dxpr-builder/integrations/analyzing-results).

## Smart sort for accordions and tabs

Smart sort keeps every item but changes their order. Items that visitors open or click most move to the top.

1. Click **More** on an **Accordion** or **Tabs**element.
2. Under **Smart sort**, choose **Enable smart sort**. A sort icon appears on the element's control bar.
3. Optional: choose **Experiment settings** and switch between **Open item** and **Click on item**.
4. Click **Save** on the toolbar.

Other containers with two or more items offer smart sort in the **Power user** view. To stop, choose **Disable smart sort** and save: saving deletes the numbers collected so far.

## Remove a variant

1. Click the pill of the variant you want to remove.
2. Click **More** and choose **Remove variant B**(the label names the active variant).
3. Click **Save** on the toolbar.

Saving deletes the numbers of the removed variant. When only one version is left, the test ends and its data is deleted. Letters stay stable: removing B does not rename C.

## Settings

These are the fields of the **Experiment settings**dialog.

| Setting | What it does | Default |
|---|---|---|
| **Conversion** | What counts as success: **Time on element**, **Time on page** or **Click on element** | **Time on element** |
| **Seconds** | For the two time conversions: how long, from 1 to 60 | 10; the dialog proposes 5 |
| **CSS selector (optional)** | For **Click on element**: count clicks on other elements of the page, such as `#signup-form` | empty: clicks on the variant itself |

## If you don't see Create variant working

- **Create variant is greyed out and mentions the RL module.** The RL module is not enabled. Install and enable it as shown under Before you start.
- **Create variant is greyed out: "A/B test results are not being collected."** The site cannot reach rl.php. Follow the advice of **RL: rl.php accessibility** on the status report.
- **Create variant is greyed out: "A parent element already has A/B variants."** Tests cannot be nested. Remove the other test first, or pick an element outside it.
- **Create variant is greyed out: "This element uses smart sort."** One element runs one kind of test. Choose **Disable smart sort** first.
- **There is no Create variant on a Drupal block or view.** Blocks and views cannot hold variants. Create the variant on the column or section around them.
- **Visitors always see version A.** Without rl.php, every visitor gets the first version. Administrators see a warning on pages with a test. Fix rl.php as the status report describes.

## What's next?

[Analysing results once your test is running](/hc/documentation/learn-dxpr-builder/integrations/analyzing-results) to continue exploring DXPR Builder.