angular-ab-test

Simple A/B testing for AngularJS

Usage no npm install needed!

<script type="module">
  import angularAbTest from 'https://cdn.skypack.dev/angular-ab-test';
</script>

README

Angular A/B Test

Simple A/B testing directive because Optimizely is pretty rough at working with AngularJS projects.


Example | Documentation


Get Started

Add an <experiment> tag like so:

<experiment name="sample-test" variant="a">
    <p>a variation</p>
</experiment>

It will show if there's a value for abtests in your localStorage that happens to look like this:

[{"name":"sample-test","value":"a"}]