---
title: "How to run A/B testing with experiments"
slug: "how-to-run-a-b-testing-with-experiments"
description: "Learn how to run an A/B test in Data Activation: configure an experiment with weighted groups, assign tags to groups, and test it."
updated: 2026-06-25T06:43:12Z
published: 2026-06-25T06:43:12Z
canonical: "docs.supermetrics.com/how-to-run-a-b-testing-with-experiments"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.supermetrics.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to run A/B testing with experiments

Experiments let you A/B test changes on your site by showing different visitors different tags. You split your visitors into groups, assign different tags to each group, and compare how each group responds, so you can see which version works best.

An experiment divides your visitors into groups. You assign tags to those groups, and when a visitor reaches a page where those tags run, the experiment assigns the visitor to one group. The assignment is saved in the visitor's browser, so the visitor stays in the same group on return visits.

Visitors are assigned at random, based on the weight you give each group. For example, if an experiment has two groups split 3 to 1, a visitor has a 75% chance of landing in the first group and a 25% chance of landing in the second.

## Instructions

### Step 1: Configure an experiment

1. In Data Activation, go to **Tags** → **Experiments**.
2. Click **+ New experiment**.
3. Give the experiment a name.
4. Add your experiment groups. Give each group a clear name, and set its weight to control how much of your traffic goes to it.
5. Click **Create experiment** to save the experiment.

### Step 2: Assign a tag to an experiment group

You assign a tag to a group by adding an experiment condition to the tag. For how conditions work in general, see [Tag targeting rules](/v1/docs/how-to-use-tag-targeting-rules).

1. In Data Activation, navigate to **Tags** and select **Pages**.
2. Open the tag you want to test.
3. Click the pencil icon to configure rules.
4. Select the **Experiment** rule, then choose the experiment and the group this tag belongs to.
5. Save the rule, then publish your changes.

### Step 3: Test your experiment groups

1. Go to the website you're setting the tags for.
2. To open the **Tag status** window, open the Developer tools in your web browser, go to Console, and paste `_st.debug.enable();` to the Console. Note that you need to be logged in to the Data Activation platform to see the tag status details. Alternatively, you can open the **Tag status** window through a browser bookmark: Save the `javascript:_st.debug.enable();` code as a browser bookmark and open that bookmark when you’re on the website you’ve set up the tags for.
3. Select **Userdata** to see which experiment groups you're assigned to. You can switch groups here to check that each one behaves as expected.

## More resources

- [How to use tag targeting rules](/v1/docs/how-to-use-tag-targeting-rules)
- [How to create and manage tags](/v1/docs/how-to-create-and-manage-tags)
- [How to view tag status window](/v1/docs/how-to-view-tag-status-window)
