Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/firstandthird/ab-test

Simple A/B testing using Domodule and Micro Metrics
https://github.com/firstandthird/ab-test

front-end

Last synced: 3 days ago
JSON representation

Simple A/B testing using Domodule and Micro Metrics

Awesome Lists containing this project

README

        

# AB Test ![npm](https://img.shields.io/npm/v/@firstandthird/ab-test.svg)

Simple A/B Testing library using [Domodule](https://github.com/firstandthird/domodule) and [Micro Metrics](https://github.com/firstandthird/micro-metrics-browser)

## Installation

```sh
npm install @firstandthird/ab-test
```

## Usage

### JavaScript

```js
import '@firstandthird/ab-test'
```

### HTML

```html



Test
Foo


Sign up now

```

It needs to receive some options or they should be defined on the window object:

* `url`: `data-module-url` as an option or have `metricsEndpoint` defined on the `window` object.
* `session`: `data-module-session-id` as an option or have `metricsSession` defined on the `window` object.