@magnet.me/mm-experiments

Set of directives to integrate A/B testing in an Angular application.

Stats

StarsIssuesVersionUpdatedCreatedSize
@magnet.me/mm-experiments
201.2.24 years ago5 years agoMinified + gzip package size for @magnet.me/mm-experiments in KB

Readme

Magnet.me Logo

mm-experiments

Set of directives to integrate A/B testing in an Angular application.

Usage with Google Experiments:

app
    .run((experiments, googleExperiments) => {
        //Configure all the things
        experiments.setVariationFactory('my-experiment', () => googleExperiments.getVariation('googleExperimentId'));
    })
    <div mm-experiment="my-experiment">
        <h1 mm-variation="0">Stuff</h1>
        <h1 mm-variation="1">Other stuff</h1>
        <p>
            Above is showing variation {{$variation}}
        </p>
    </div>

Caveats

Some experiment providers (e.g. Google Analytics) require you to send an additional request after loading the experiment

This module only loads the experiment in the browser, but does not automatically send anything to your experiments provider. For example, Google Analytics requires that at least one hit is send to Google Analytics after loading the experiments. This module does not do that for you since this we do not know how you interact with Google Analytics (this is application specific) and therefore we cannot determine an appropriate action to take to send the hit to GA.

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.