<commit_before># OptimizelyAbCallback [![Build Status](https://travis-ci.org/guilhermef/optimizely-ab-callback.svg?branch=master)](https://travis-ci.org/guilhermef/optimizely-ab-callback)

Optimizely with callbacks.

## Installation

Configure your optmizely to run the

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

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

![step-1](/../master/docs/step-1.png?raw=true "step-1")

on the script's popup add:
```JavaScript
    /* _optimizely_evaluate=force */
    window.OptimizelyAbCallback.init();
    /* _optimizely_evaluate=safe */
```

and then "apply" and "save".

![step-2](/../master/docs/step-2.png?raw=true "step-2")

put the JS file [source](../master/dist/OptimizelyAbCallback.js) ([minified](../master/dist/OptimizelyAbCallback.min.js)) on your page and run:

```JavaScript
    window.OptimizelyAbCallback.includeABScript(OptimizelyProjectId);
```

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

```JavaScript
    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.
<commit_msg>Better format<commit_after># OptimizelyAbCallback [![Build Status](https://travis-ci.org/guilhermef/optimizely-ab-callback.svg?branch=master)](https://travis-ci.org/guilhermef/optimizely-ab-callback)

Optimizely with callbacks.

## Installation

Configure your optmizely to run the

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

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

![step-1](/../master/docs/step-1.png?raw=true "step-1")

on the script's popup add:
```JavaScript
/* _optimizely_evaluate=force */
window.OptimizelyAbCallback.init();
/* _optimizely_evaluate=safe */
```

and then "apply" and "save".

![step-2](/../master/docs/step-2.png?raw=true "step-2")

put the JS file [source](../master/dist/OptimizelyAbCallback.js) ([minified](../master/dist/OptimizelyAbCallback.min.js)) on your page and run:

```JavaScript
window.OptimizelyAbCallback.includeABScript(OptimizelyProjectId);
```

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

```JavaScript
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.

{'fraction_non_alphanumeric': 0.13642384105960265, 'fraction_numerical': 0.003973509933774834, 'mean_word_length': 4.743346007604563, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3969949', 'n_tokens_mistral': 1018, 'n_tokens_neox': 971, 'n_words': 233}