---
title: Steps to create an experiment
slug: web-experimentation/docs/steps-to-create-an-experiment
docTags: 
createdAt: 2026-07-20T15:45:32.105Z
---

- Optimizely Web Experimentation
- Optimizely Performance Edge

Optimizely Experimentation makes it easy to A/B test your website. Use the experimentation editor to design variations, define where the experiment runs and who sees it, create events to measure success using metrics, and test your experiment. When your experiment works the way you want, publish it to the world.

Follow these steps to create, configure, and launch an experiment in Optimizely Web Experimentation or Optimizely Performance Edge. See [Optimizely Web Experimentation implementation checklist](docId\:AARw7uTmrUJRM3dlVSmF4). 

## Create an experiment

1. Go to the **Experiments** or **Optimizations** dashboard.
2. Click **Create New Experiment**\*.\*
3. Select **A/B Test** from the dropdown.

   ::Image[]{src="https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/yuZymEtaAkKAiST4UJYZe-20260720-150120.png" size="100" isUploading="false" showCaption="false"}
4. Enter a name and description (optional) for your new experiment. 
5. Set where your experiment runs. Choose to **Target By URL** to run an experiment once. Choose to **Target By Saved Pages** to run experiments on a set of URLs regularly. You can use a combination of [page triggers and conditions](docId\:bhoKC5w_xxear_W4tpmMf) to tell when to [activate a page](docId\:lggNdsWeiw9HyDE7JSGsX). These options are useful for single-page applications (SPAs). In Optimizely Performance Edge experiments, pages activate immediately. See [Configure a page](docId\:UTKhV6LMW92Gs6ChcHIp6).

   ::Image[]{src="https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/y3A6_MAVf9TFEaNa7eOak-20260720-150120.png" size="100" alt="Create Experiment.png" isUploading="false" showCaption="false"}
6. Click **Create Experiment**.

:::hint{type="info"}
**Note**

Before you can run an experiment, [implement the one-line JavaScript snippet](docId\:Eynqg8Z-62r76dvDho6dx) in your website's code and [create at least one metric](docId\:KiJTfQQjUsHKpV4igZ7Ea). If your Optimizely account uses [custom snippets](docId\:a3nBqUV00EHS6YncVXkrD), you might see more than one snippet listed. In this case, choose the snippet you want for your experiment.
:::

### Get test ideas with Optimizely Agent Platform

You can get potential test ideas with [Optimizely Agent Platform](docId\:IzAAN1fw7whD1HB4iODAB). Mark incorporates best practices developed internally within Optimizely to provide potential experiment ideas. Before getting test ideas, [Configure Web Experimentation for Optimizely Agent Platform](docId\:hlHMQy1FYLEFZuoQwEAep).

1. Go to the **Experiments** or **Optimizations** dashboard.
2. Click **Get Test Ideas**. The [Mark chat for Experimentation](docId:6gjTnr7RZXwvAzqSCkkZe) displays with the following message "*Please provide a website URL or image and I'll start my analysis!*".

   ::Image[]{src="https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/1oenS5886FxLy_EpJ73sp-20260720-150120.png" size="100" isUploading="false" showCaption="false"}
3. Enter the URL or upload an image, then click **Submit** or press Enter.
4. Mark analyzes a screenshot of the provided URL or image and then provides some test ideas for improvement. Improvements can include clarity of the value proposition, call-to-action, user experience, and so on.

:::hint{type="info"}
**Note**

If you use Opti ID, administrators can turn off generative AI in the Opti ID Admin Center. See [Turn generative AI off across Optimizely applications](docId\:X5U0kKD2azV5cIdNqwGNj).
:::

## Set your target

Set the conditions for your targeting. Although you chose how to target when creating the experiment, you can set triggers, conditions, and test URLs for the activation. See [Target URLs to choose where your experiment runs](docId\:CXRLj-8Ogaa5pJZpIMdkq) for information.

You can also choose your audience for the experiment. [Audiences](docId\:tSoFLwt3tc93lZ30vPaLd) let you decide who sees your experiment. 

The default audience is all visitors to your site (**Everyone**). Click **Search and add audiences** to create [an audience](docId\:t4-tpQf64GRofnzZhgi_T) or add any existing audiences to your experiment. 

![Audiences.png](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/_Jrtl15giTYYVJszNihbp-20260720-150120.png)

You can combine multiple audiences in your experiment using AND and OR conditions. See [Target audiences using the Audience Builder](docId\:tSoFLwt3tc93lZ30vPaLd) for advanced audience configurations.

## Design your experiment

### Variations

Go to **Design > Variations** to create and edit variations for your experiment.
 

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/vaQ4TpJjG3I-TbC8OW9WJ-20260720-150120.png)

You can optionally upload a screenshot for each variation by clicking **Upload** and selecting your desired image. Each image you upload displays on the **Variations** page, with options to delete, replace, or maximize the image. The following shows an example of variations with screenshots uploaded.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/3snRyq6j3VtGMV99Avym4-20260720-150120.png)

Selecting a variation opens the **Visual Editor**, which lets you make the following changes to your webpage:

- Change the layout, including the element's visibility or position. Rearrange the elements on the page.
- Modify or replace typography, images, background styles, or borders.
- Add inline CSS.
- Fine-tune jQuery selectors.
- Change the timing of the change from synchronous to asynchronous. 

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/OS-NUeOnuXzUOhfMJIlGm-20260720-150120.png)

### Shared Code

You can apply code that is shared among all variations in the experiment. See [Shared code](docId\:u7NyuYQdFZ7CXPKxIQt1i) for information.

![Shared code.png](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/E01ErO7qx-dbAo7bWSMWR-20260720-150120.png)

### Traffic Allocation

Set traffic allocation to specify how [traffic is split](docId\:ICcJzt1ftdWh19giis3Rt) between your variations. Optimizely Experimentation randomly allocates traffic into different variations, including the original.

You can change the traffic volume for each variation, if desired. You can also change the total traffic that goes into the experiment as a whole.
 

![Traffic Allocation.png](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/lj3hAqFj2XkI7gSh07vdr-20260720-150120.png)

## Track your experiment

### Metrics

After you design your experiment, you must define how to measure success using [metrics](docId\:QMhSl6-5c54bbhHlZwMcp).

Go to **Track > Metrics**. Click **Add Metric** and choose your metric type and event.

![Add Metric.png](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/orh2JXroQi9in3DHzoccy-20260720-150120.png)

You can also use the **Sample Size Calculator** to determine how many visitors you may need for [Optimizely's Stats Engine](docId\:e7e-S6BollFwcP1RX9YS_) to detect a significant result. See [Use minimum detectable effect when designing an experiment](docId:0NHL0ppkIJjpuipng99bL) for information.

The first metric you add is the [primary metric](docId\:oWMQ0BWo1DoM2WWKINZSP) for the experiment. This metric determines whether your experiment "wins" or "loses" and should track an event that is *directly* affected by the changes you make in your experiment. You can also add [secondary metrics](docId\:oWMQ0BWo1DoM2WWKINZSP) or [monitor goals](docId\:KiJTfQQjUsHKpV4igZ7Ea) to measure the downstream effects of your experiment.

:::hint{type="info"}
**Note**

To complete the experiment configuration, you must add at least one metric. You can change, remove, or add metrics to your experiment later. Click **Save** when you are finished adding metrics to your experiment.
:::

### Integrations

You can select integrations for your experiment, such as [Google Analytics 4](docId\:jKC-rUq-6xMK1h5WTJJz7). Click **Project Integration Settings** to enable integrations for your project.

![Add Integrations.png](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/oELsp8hqg0aq-_3M91pJa-20260720-150120.png)

## Schedule your experiment

Go to **Plan** to schedule your experiment if you want to automate it. You can select the **Start Time**, **End Time**, and **Time Zone**. Click **Save**.

![Schedule experiment.png](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/nn5JqDXFGzCuU61_bWYjQ-20260720-150120.png)

## Test and publish

After you configure the components of your experiment, preview it to ensure it looks and works the way you intend.

Click the **Preview** icon to view visual changes for your variation.
 

![Preview.png](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/Vepo2Z8M9dODrxtfxf7_k-20260720-150120.png)

See [Preview and publish your experiment](docId\:G6SR7VF02w5hyw2yj0BLr) on how to test the functionality of your campaign.

If you do not see your changes in Preview mode, ensure your [snippet is implemented ](docId\:M6RILLhWL00xbDL8b_3K-)on this page and configured to include Optimizely Web Experimentation or Optimizely Performance Edge.

See[ Test Optimizely Experimentation](docId\:JU1Sh9PVLBMIW2_VDbTjx) for what you need to consider before fully testing your experiment, or see [Troubleshoot experiments](docId\:ZzEM9LduOdal2Pjwi_Vbp).

### View a summary of the experiment

In addition to previewing and testing your experiment, use the **Summary** page in an experiment to view a high-level summary of the experiment settings. You can download and share this summary with stakeholders for easier reporting on the experiments you are running.

See the [interactive demo](https://optimizely.navattic.com/jkb01ua).

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/K0YRQm-04nf_rfXdm0aah-20260720-150120.png)

### Run a pre-launch experiment review with Mark

On the **Summary** page of your experiment, click **Review Experiment** to use [Optimizely Agent Platform](docId\:IzAAN1fw7whD1HB4iODAB) to review your experiment configuration and recommend changes to maximize your odds of reaching statistical significance.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/rp-pVG3QgGheLQH0ePzhc-20260720-150120.png)

You can run the same review by going to **Start Experiment > Pre-launch Review**.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/9_xobr4Aw7nYPQ4EcCki5-20260720-150120.png)

For example, as shown in the following image, Mark may find that you are missing metrics or need to pick better metrics. Mark also provides a breakdown of feedback by category: critical issues, improvements to consider, and strengths of your experiment.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/sNqv6nOpEvAOgRbAVoGUk-20260720-150120.png)

Review and apply Mark's feedback before publishing your experiment to ensure the best results.

### Publish the experiment

When everything looks and works as you want it to, click **Start Experiment** to deploy the experiment live to your webpage visitors. 

![Start Experiment.png](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/Zgw_StbcpyX3dA5MjFfJh-20260720-150120.png)
