opthub

optimizely->fs

opthub

Sync an Optimizely snippet w/ your local fs - easier version control, linting, code reviews etc...

npm install -g opthub

See the output in ./opthub-output/!

# Run it!
$ opthub 
prompt: http://cdn.optimizely.com/js/THIS_NUMBER.js:  1127947420
./opthub-output/: 2 experiments / wrote 8 files

See the output in ./opthub-output/ and ./optimizely-example/!

# Compile your snippet ids (1 or more)
$ curl -s http://www.optimizely.com | grep -n cdn.optimizely.com
6:<script type="text/javascript" src="//cdn.optimizely.com/js/5935064.js"></script>
 
# Make a ./.opthubrc file w/ snippet/name pairs
$ echo '{"1127947420":"opthub-output","5935064":"optimizely-example"}' > .opthubrc
 
# Run it!
$ opthub
./optimizely-example/: 75 experiments / wrote 169 files
./opthub-output/: 2 experiments / wrote 8 files

We're an AB Testing Consulting Agency specializing in Optimizely engagements. We're hiring!