Web implementation
Web Experimentation
The standard project snippet, loaded high in the document head to minimize flicker.
Browser · synchronousLive decision runner
Simulation modeNo credential is stored in this repo. Simulation is deterministic and clearly labeled. Add a Web project ID to send real decisions and events; it stays in this browser’s local storage.
Implementation
Official docs ↗<script src="https://cdn.optimizely.com/js/PROJECT_ID.js"></script>
window.optimizely = window.optimizely || [];
window.optimizely.push({ type: 'event', eventName: 'demo_purchase' });