- Optimizely X Web Experimentation
- Optimizely X Web Personalization
- Optimizely X Web Recommendations
this article will help you:
- Choose whether to use the bundled snippet or the Optimizely X standalone snippet.
- Switch from the bundled snippet to the Optimizely X standalone snippet.
When you set up Optimizely X, you can configure the Optimizely snippet in two ways:
The bundled snippet includes both Optimizely X and Optimizely Classic.
The standalone snippet includes only Optimizely X. Choosing the standalone snippet turns off all experiments in Optimizely Classic.
This article describes the difference between bundled and standalone configurations. If you're setting up Optimizely, check out this article to see all the steps for implementing your snippet.
If you're moving to Optimizely X Web from Classic, check out our guide for many more resources to help during your transition.
To learn how Optimizely experiments activate, read this article on the order of activation in Optimizely X.
Switch to Optimizely X (standalone) snippet configuration
Here's how to switch to the Optimizely X (standalone) snippet configuration, with step-by-step instructions below.
In Optimizely Classic, click the Optimizely X tab.
In Optimizely X, navigate to Settings > Implementation.
Under Optimizely X, in the drop-down menu, select Enabled.
Under Snippet Configuration, select Use only Optimizely X.
To switch to the bundled snippet, navigate to Settings > Implementation and select
Use both Optimizely X and Optimizely Classic.
The bundled snippet includes Optimizely X and Optimizely Classic. It's the default setting for your snippet and allows you to keep running experiments in Optimizely Classic while you try out Optimizely X.
The bundled snippet is ~50kB larger than the standalone snippet. When you're ready to transition to Optimizely X, we recommend switching to the standalone snippet to reduce snippet size and improve speed and performance.
But Optimizely X and Optimizely Classic use different logic to execute changes on the page, so what happens when you include both with the bundled snippet?
The bundled snippet executes all changes in Optimizely Classic experiments first. Then, it executes changes from Optimizely X campaigns and experiments.
If you'd like a reminder, here's how the Optimizely Classic snippet works.
window.optimizely2? It's a special global variable that is only exposed in bundled mode. It's not a public API—it's subject to change without notice—and it will disappear when the snippet switches to standalone mode.
Feel free to sniff around in
window.optimizely2 from the browser console when you're trying to debug a web page, but don't save any code that refers to it, not even in the project's various custom JS fields. When implementing experiences, you should only use the publicly-documented Optimizely X Web JS APIs, which reference
window.optimizelyand which are supported in both bundled and standalone mode.
The standalone snippet executes campaigns and experiments in Optimizely X when visitors arrive to your site. When you switch to the standalone snippet, Optimizely Classic experiments are disabled.
You'll continue to see your disabled experiments and projects listed when you log into Optimizely Classic. If you want to start running them again, you can revert to the bundled snippet.
When you switch to the standalone snippet, all currently running experiments in Optimizely Classic will be paused. Further, all Optimizely Classic functionality is removed from the snippet. We recommend that you turn off or properly transition all existing Optimizely Classic features and assets before you switch to the standalone snippet so that you don't lose experiment data.