- Optimizely X Web Experimentation
- Optimizely X Web Personalization
- Optimizely X Web Recommendations
This article will help you:
- Add one line of code to your site to start running Optimizely experiments (A/B tests)
- Set up pages, events and audiences within Optimizely
Welcome to Optimizely! If you are in charge of setting up Optimizely, you've come to the right place. We'll show you how to implement the snippet as well as set up your pages, events and audiences. Each video will quickly walk you through the process of setting up Optimizely for your site.
For more details about implementation, check out our Optimizely Academy course, Implement Optimizely X.
Implement the Snippet
If this is your first time using Optimizely, you'll need to add a small snippet of code to the <head> tag of your site's code to start running A/B tests. This snippet contains your unique Project ID and allows the experiments you create in Optimizely to execute on your site. It automatically updates to run any test you create in the Optimizely Editor. You don’t have to change a thing.
Want to see how the snippet is installed and follow along? Watch our two-minute video:
Is your site a Single Page Application (SPA)? Learn more about testing Optimizely on a Single Page Application before you add your snippet.
Once you install the snippet, you'll be able to run experiments anywhere on your site after following the four steps shown below.
1. Add Pages
Pages are URL templates that let you choose where campaigns and experiments run. They're reusable URL patterns that are always on. You'll use them to tell Optimizely where to deliver experiments, personalized experiences, and recommendations on your site.
Add pages based on the URL (or pattern of URLs) where you want to test or personalize an experience. Learn to set up a page.
Here's a quick walkthrough:
2. Add Events
You can think of events as the “verbs” of Optimizely X. They track the actions that people take on your site, such as clicks, pageviews, form submissions, and purchases. Learn to set up a click, pageview, or custom event.
Here's a quick video walkthrough of setting up an event.
3. Add Tags
If events are “verbs” such as clicks and pageviews, then tags are “adjectives." They describe key parts of a page that visitors engage with, such as the type of product and what it costs.
If you're using Optmizely X Web Personalization, tags and events provide data-rich picture of your visitors’ behavior. Use them together to create behaviorally targeted audiences. Add tags to collect the data that Optimizely uses to render recommendations. Learn to set up a tag.
Here's how to tag a Price element:
And here's how to set up a Subcategory Tag:
4. Add Audiences
Audiences are groups of visitors to whom you'll show an experiment or personalized experience. Do you know which visitor visitor segments are important to your business? Set them up as audiences so you can target them or see how they perform in your results, compared to all visitors.
To learn how to create audiences, watch this quick video: