Skip to content

guilhermef/optimizely-ab-callback

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OptimizelyAbCallback Build Status

Optimizely with callbacks.

Installation

Configure your optmizely to run the

    /* _optimizely_evaluate=force */
    window.OptimizelyAbCallback.init();
    /* _optimizely_evaluate=safe */

on the experiment screen click on "Options" then "Experiment Javascript"

step-1

on the script's popup add:

/* _optimizely_evaluate=force */
window.OptimizelyAbCallback.init();
/* _optimizely_evaluate=safe */

and then "apply" and "save".

step-2

put the JS file source (minified) on your page and run:

window.OptimizelyAbCallback.includeABScript(OptimizelyProjectId);

That will include the optimizely script. after that just call:

var experimentCallback = function(variation) {
  console.log(variation);
};

window._optiab.push([experimentID, experimentCallback]);

Contributing

We'll check out your contribution if you:

  • Provide a comprehensive suite of tests for your fork.
  • Have a clear and documented rationale for your changes.
  • Package these up in a pull request.

License

MIT. See LICENSE.txt in this directory.

About

Script to give optimizely the power of javascript's callback...

Resources

License

Stars

Watchers

Forks

Packages

No packages published