Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Optimizely Web ExperimentationNew to Visual Studio Code? Get it now.
Optimizely Web Experimentation

Optimizely Web Experimentation

Optimizely 2026

|
20 installs
| (0) | Free
Edit Optimizely Web Experimentation Custom JS/CSS directly in VSCode.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Optimizely Web Experimentation for VS Code

Write your experiment code where you write the rest of your code.

If you build variations in Optimizely Web Experimentation, you know the loop: write the JavaScript or CSS in VS Code, copy it, switch to the browser, find the right project, experiment, and variation, paste it in, and save. Then do it all again for the next change, and hope you pasted into the right variation.

This extension removes that loop. Browse your experiments from the VS Code sidebar, open any Custom JavaScript or Custom CSS in a normal editor tab, and save. Your change goes straight to Optimizely. No copy-paste, no tab switching, no numeric IDs.

Because the code opens in a real VS Code tab, the tools you already rely on keep working: ESLint and Stylelint, Copilot and other AI coding assistants, your snippets, themes, and key bindings.

Why use it

  • Stay in your editor. Pick an experiment, edit, save. You only go to the browser to preview and publish.
  • Stop pasting into the wrong variation. The sidebar shows exactly which account, project, experiment, variation, and page you're editing.
  • Bring your own tooling. Linting, AI suggestions, and your other extensions work on experiment code the same way they work on your codebase.
  • One source of truth. Saving from VS Code updates the same variation code that the Visual Editor and in-browser Developer Mode use, so your team sees the change right away.

What you can edit

All three experiment types are supported: A/B tests, Multivariate tests, and Personalization.

  • Shared code: the experiment-level JavaScript and CSS that runs for every variation.
  • Variation Custom Code: JavaScript and CSS for each individual variation.
  • Page actions (A/B tests): JavaScript and CSS for each variation on each page.

You can also switch any JavaScript snippet between Sync and Async timing without leaving the editor. Use the status bar, the inline action in the sidebar, or the CodeLens at the top of the file.

Getting started

  1. Install the extension.
  2. Click the Optimizely icon in the activity bar, then click Sign In in the status bar.
  3. Your browser opens to Opti ID. Sign in, and you're handed back to VS Code automatically.
  4. In the Optimizely sidebar, pick an account, project, and experiment from the dropdowns.
  5. Click any item in the tree to open it in a tab. Edit as usual, then save (Cmd+S / Ctrl+S) to write it to Optimizely.

Tip: Click the star next to the account or project dropdown to pin it. New VS Code windows will open with it already selected.

Good to know

  • What you save is exactly what lands. The extension doesn't reformat your code, normalize whitespace, or change line endings.
  • Permissions match Optimizely. You see the accounts, projects, and experiments you already have access to. Saving requires Editor (or higher) access on the project. If you don't have it, you'll get a clear "ask an admin for Editor access" message when you save, not a generic error.
  • Sign in once a day. Sessions last 8 hours and refresh silently in the background. If a session does expire, VS Code prompts you to sign out and sign back in.
  • Your credentials stay in your OS keyring (macOS Keychain, Windows Credential Manager, or gnome-keyring on Linux). No tokens are written to disk, and tokens are redacted from logs at every log level.
  • Some things still happen in Optimizely. The extension edits code on existing experiments. Creating experiments, previewing, and publishing are still done in the Optimizely app.

Settings

Setting Default What it does
optimizely.log.level off How much the Optimizely Output channel logs: off, info, or debug. Tokens are always redacted.
optimizely.tree.refreshDebounceSeconds 30 Minimum time between automatic sidebar refreshes when the sidebar regains focus.
optimizely.auth.tokenExpiryBufferSeconds 60 How long before a token expires the extension refreshes it silently.
optimizely.auth.signInTimeoutSeconds 300 How long to wait for you to finish signing in through the browser.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft