Skip to content

Latest commit

 

History

History
57 lines (38 loc) · 1.43 KB

README.md

File metadata and controls

57 lines (38 loc) · 1.43 KB

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.