When you set up Optimizely for the first time, you'll need to implement the Optimizely snippet: a single line of code that lets you start running A/B tests.
In general, we recommend that you do not load the Optimizely snippet through a tag manager.
Loading Optimizely through a tag manager can cause issues such as page flashing, where the original version of your page is briefly displayed to visitors before the Optimizely experiment. Google Tag Manager, for example, doesn't support synchronous loading. Tag managers can also cause issues with your analytics integrations. To deliver the best experience to your visitors, we strongly recommend that you implement Optimizely outside of a tag manager.
If you must load Optimizely through a tag manager, first consider these pitfalls and implementation suggestions and please reach out to your Customer Success Manager to discuss the implications.
Here's how to use Ensighten with Optimizely:
In Ensighten Manage, create a new deployment.
In the Project Script URL field, add your Optimizely snippet, starting with the two slashes (for example, //cdn.optimizely.com/js/12345678.js). Click Next.
Set the Condition to Global and the Execution to Immediate. Click Next.
Set the order of priority so that Optimizely fires before other tags, including your analytics tags and any other asynchronous tags. Click Save.