Optimizely Web Experimentation JavaScript snippet

  • Updated
This topic describes how to:
  • Learn about the Optimizely Web Experimentation snippet from a non-technical perspective and how Optimizely Web Experimentation works
  • Connect to resources about the snippet

Optimizely Web Experimentation creates experiments on your site by executing a one-line JavaScript snippet that contains your unique Project ID. Once you implement the snippet, you can build experiments and campaigns on your site. This snippet automatically updates to run any experiment you create in the Editor. You don’t have to change a thing.

Here is how to set up Optimizely Web Experimentation.

A non-technical explanation on how Optimizely Web Experimentation works

How does Optimizely Web Experimentation work without getting into a technical explanation? Simple: Optimizely Web Experimentation allows you to perform A/B testing (also known as split testing) and multivariate testing across your entire technology stack. In Optimizely Web Experimentation, these are called experiments.

Experiments that you perform on your website are executed via a one-line JavaScript snippet. This single line of code loads Optimizely Web Experimentation on your site and changes the experience for visitors who are randomly bucketed into "variations." Other visitors will see a "baseline" or "original" experience. Optimizely Web Experimentation helps you compare these different variations of an experience and determine which leads to a better user experience and more conversions.

The snippet handles how those changes execute for visitors to your site. Each snippet lives in a project in your Optimizely Web Experimentation account. The project is a space where you build and manage experiments and track the results.

If your account uses custom snippets, you might have more than one snippet listed in your projects.

Optimizely Web Experimentation collects data on your visitors and conversions and runs them through our Stats Engine to show you which variations were winners or losers compared to your baseline so that you can make decisions about which changes to implement permanently on your site.

Here is a quick visual of how the process works:

If you are experimenting with your mobile app or across your technology stack, Optimizely Experimentation offers various software development kits (SDKs). You can learn more about our Optimizely Feature Experimentation SDKs on our developer documentation site.

How else can you use Optimizely Web Experimentation? In addition to A/B and multivariate testing, you can:

Technical resources

Here are more technical details about Optimizely Web Experimentation: