# Create & Configure A/B Test

## A/B Test Process

To run an A/B Test, you generally go through the following stages:

1. Prepare the A/B Test
2. Run the A/B Test
3. Conclude the A/B Test

This document walks you through each detailed step of the above process in order.

## Prepare the A/B Test

Decide what data to collect.

### 1. Select the A/B Test subject

If any change could affect your existing users, it is worth considering as a candidate for an A/B Test.\
Typical examples include:

* Logic or algorithm changes
* UI/UX changes
* Marketing copy or banner changes

### 2. Create goals and hypotheses

To reach a conclusion after an A/B Test about which option — the existing version or the new version — is better, you need a criterion for judgment.\
This could be more user signups, more button clicks, reduced loading times, and many other possibilities.\
This criterion is called a goal.

If you find it difficult to define a goal, it helps to create a hypothesis.\
Think about why the new version would be better than the existing version, or what the reason for the change was, and then define a hypothesis.

## Run the A/B Test

![](/files/E0MNdVuYibhMH9AxaIRb)

To start an A/B Test, you first need to create a new A/B Test.

Create an A/B Test, run it, and collect data.

![](/files/BAC1iHpym3YbSgdaklub)

### 1. Create an event

An event represents user behavior data such as click logs, content creation logs, and purchase logs. Events are used to calculate the goals that measure A/B Test results (e.g., click-through rate).\
Refer to the document below for how to create an event.

{% hint style="info" %}
You do not need to create events first

You can also create them during the goal setup process in **`3. Register goals`**.
{% endhint %}

{% content-ref url="/pages/NPmB05zQFHlj3BRtMM86" %}
[Create Event](/en/event-management/create-event.md)
{% endcontent-ref %}

### 2. Create an A/B Test

When creating an A/B Test, you can configure the current version and the new versions you want to compare.\
For more details, refer to the document below.

{% content-ref url="/pages/AMp2KFERF1j6ZH3d2dy7" %}
[Create a New A/B Test](/en/ab-test/create-and-configure/create-ab-test.md)
{% endcontent-ref %}

### 3. Register goals

As described earlier, goals are the means to measure the performance of an A/B Test.\
You can register multiple goals to measure, and previously registered goals can be easily re-added.\
For more details, refer to the document below.

{% content-ref url="/pages/iZmrXPOh8EMQH12RyWFn" %}
[Set Metrics](/en/ab-test/create-and-configure/set-metrics.md)
{% endcontent-ref %}

### 4. Integrate Hackle platform

Platform integration is required to implement the A/B Test in code and measure goals.\
The following document lets you explore the features and supported languages of the SDK provided by Hackle, and check the integration guide for each language.

{% content-ref url="/spaces/ezh7pUfOjUmS5W8txJ85" %}
[Broken mention](broken://spaces/ezh7pUfOjUmS5W8txJ85)
{% endcontent-ref %}

### 5. Start the A/B Test

You are one step away from starting the A/B Test: setting the traffic percentage.\
Hackle's **Traffic Allocation** feature lets you configure what percentage of total users should be exposed to the A/B Test.

{% content-ref url="/pages/Tw3ijsBw6xndEs77J0lN" %}
[Traffic Allocation](/en/ab-test/create-and-configure/traffic-allocation.md)
{% endcontent-ref %}

You are now ready to start the A/B Test.\
You can find out how to start and stop an A/B Test in the document below.

{% content-ref url="/pages/sAcqwYg4vOTvZC75gw2I" %}
[A/B Test Status](/en/ab-test/status.md)
{% endcontent-ref %}

{% hint style="success" %}
Run the test for at least one week

We recommend running the test for at least 1 week to prevent skewed results due to day-of-week effects.
{% endhint %}

## Conclude the A/B Test

Analyze the collected data and draw conclusions about the results.

![](/files/55wHbgEIjy2zwwdgSMXe)

### 1. Interpret A/B Test results

The results of an A/B Test can be found in the **`Data Analytics`** tab on the A/B Test detail page.\
You can learn about the data available from the results and how to interpret them in the document below.

{% content-ref url="/pages/cE4mJFqO0uEPz549QKqA" %}
[Data Analysis](/en/ab-test/data-analysis/interpret-results.md)
{% endcontent-ref %}

{% hint style="info" %}
If you need raw data

If you are on a paid plan (Pro plan or higher), you can export data for variation distribution and events.\
For more details on data export, refer to [Data Export](/en/data-link/data-integration-data-export.md).
{% endhint %}

### 2. Conclude the test

Once you have the results, conclude the A/B Test.\
When you select a Winner group upon concluding the test, all users will see the Winner group's result.

{% hint style="danger" %}
**After concluding the experiment, be sure to remove all code related to that A/B Test.**
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hackle.io/en/ab-test/create-and-configure.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
