Optimizely Full Stack provides a JS SDK that enables customers to activate and track experiments client side. One exciting benefit of Full Stack is the ability to activate and track experiments across SDKs/channels. For example, you might want to start an experiment in one channel using the Python SDK, and then track conversions clientside back to the experiment with JS.
This repo is an example of how to bundle and initialize Optimizely Full Stack JS SDK into a single file.
Requirements
- Must be an Optimizely Full Stack customer
- Must have Node installed
- Create an Optimizely Full Stack Project
- Fork this repo and clone it
- Run
npm install
in a new terminal window - Run
gulp watch
to start watching for changes to bundle - Enter your Optimizely Full Stack project ID in line 6 of index.js
- Write your code!
Your code will be bundled into the /build
directory. Either serve this code locally, or host in on a service such as AWS S3 to serve the js file client side