---
title: "Getting started with web experiments"
slug: "getting-started-with-web-experiments"
abstract: "Describes getting started with web experiments."
---
# Getting started with web experiments

This topic describes how to get started building a web experiment. We recommend that you complete these steps in the following order:

1. [Create a web experiment](https://doc.sitecore.com/personalize/en/users/sitecore-personalize/introduction-to-experiments-in-sitecore-personalize/introduction-to-web-experiments-in-sitecore-personalize/create-a-web-experiment.html "Create a web experiment") and add a variant using an out-of-the-box [web template](https://doc.sitecore.com/personalize/en/users/sitecore-personalize/introduction-to-experiments-in-sitecore-personalize/introduction-to-web-experiments-in-sitecore-personalize/create-a-web-experiment/create-a-variant-for-a-web-experiment-using-a-web-template.html "Create a variant for a web experiment using a web template") or [custom code](https://doc.sitecore.com/personalize/en/users/sitecore-personalize/introduction-to-experiments-in-sitecore-personalize/introduction-to-web-experiments-in-sitecore-personalize/create-a-web-experiment/create-a-variant-for-a-web-experiment-using-custom-code.html "Create a variant for a web experiment using custom code").
2. Apply any of the following options to the web experiment:
    - [Target a webpage](https://doc.sitecore.com/personalize/en/users/sitecore-personalize/introduction-to-experiments-in-sitecore-personalize/introduction-to-web-experiments-in-sitecore-personalize/target-a-webpage-in-a-web-experiment.html "Target a webpage in a web experiment") to set the area of your website where you want the experiment to run. You can also add JavaScript to determine the context in which the experiment should execute.
    - [Apply a condition](https://doc.sitecore.com/personalize/en/users/sitecore-personalize/introduction-to-experiments-in-sitecore-personalize/introduction-to-web-experiments-in-sitecore-personalize/apply-a-condition-to-a-web-experiment.html "Apply a condition to a web experiment") to filter the visitors that see the experiment based on real-time behavior.
    - [Apply a segment](https://doc.sitecore.com/personalize/en/users/sitecore-personalize/introduction-to-experiments-in-sitecore-personalize/introduction-to-web-experiments-in-sitecore-personalize/apply-a-segment-to-a-web-experiment.html "Apply a segment to a web experiment") to configure the experiment to only run for a certain segment of guests.
    - [Associate a decision model](https://doc.sitecore.com/personalize/en/users/sitecore-personalize/introduction-to-experiments-in-sitecore-personalize/introduction-to-web-experiments-in-sitecore-personalize/use-a-decision-model-in-a-web-experiment.html "Use a decision model in a web experiment") with your experiment to recommend dynamic offers or content.
3. [Compose the API request](https://doc.sitecore.com/personalize/en/users/sitecore-personalize/introduction-to-experiments-in-sitecore-personalize/introduction-to-web-experiments-in-sitecore-personalize/compose-the-api-request-for-a-web-experiment.html "Compose the API request for a web experiment") to apply further personalization using dynamic data.
4. [Insert the web experiment in your HTML](https://doc.sitecore.com/personalize/en/users/sitecore-personalize/introduction-to-experiments-in-sitecore-personalize/introduction-to-web-experiments-in-sitecore-personalize/create-a-web-experiment/inserting-a-web-experiment-in-your-html.html "Inserting a web experiment in your HTML") by specifying in the JavaScript editor where in the Document Object Model (DOM) you want the offer or content to display.
5. [Preview the web experiment](https://doc.sitecore.com/personalize/en/users/sitecore-personalize/introduction-to-experiments-in-sitecore-personalize/introduction-to-web-experiments-in-sitecore-personalize/preview-a-web-experiment.html "Preview a web experiment") in your organization's website.
6. [Add a primary goal](https://doc.sitecore.com/personalize/en/users/sitecore-personalize/introduction-to-experiments-in-sitecore-personalize/introduction-to-goals-in-sitecore-personalize.html "Introduction to goals in Sitecore Personalize") to the web experiment. Sitecore Personalize uses the metrics of the primary goal to measure variant performance when determining a leading or winning variant.
7. [Start the experiment](https://doc.sitecore.com/personalize/en/users/sitecore-personalize/introduction-to-experiments-in-sitecore-personalize/managing-experiment-status-in-sitecore-personalize/start-an-experiment-in-sitecore-personalize.html "Start an experiment in Sitecore Personalize"). After the experiment runs for 24 hours, you can see how the variants are performing against each other on the Performance dashboard.