# Skift [![npm version](https://badge.fury.io/js/skift.svg)](https://badge.fury.io/js/skift) [![Build Status](https://travis-ci.org/trustpilot/skift.svg?branch=master)](https://travis-ci.org/trustpilot/skift)

A/B Testing tool for the modern Web

## Usage

### Basic usage

```js
import skift from 'skift';

// Configure Skift.
skift.config({
  tracking: {
      track: function(event, trackingData) {
          console.log('A/B test event: ' + event, trackingData);
      }
  }
});

// Describe the A/B Test.
skift
  .create('My awesome test')
  .setCondition(() => {
      return window.location.pathname === 'contacts'
  })
  .addVariation({
      name: 'A form with the new design',
      setup() {
          document.getElementsById('form').addClass('visible')
      }
  })
  .addVariation({
      name: 'Control'
  })
  .setup(); // Don't forget to setup the test!
```

## New to A/B testing?

We recommend using [Amplitude](https://amplitude.com/) for goal tracking.

## Contributing

Interested in contributing? Please have a look at our [developer documentation](CONTRIBUTING.md) for more information on how to get started.

<p align="center">
  <img width="460" height="auto" src="https://user-images.githubusercontent.com/3983879/27422227-ac2dc336-572d-11e7-9c48-94a56fcf1191.png">
</p>

# Skift [![npm version](https://badge.fury.io/js/skift.svg)](https://badge.fury.io/js/skift) [![Build Status](https://travis-ci.org/trustpilot/skift.svg?branch=master)](https://travis-ci.org/trustpilot/skift)

A/B Testing tool for the modern Web

## Usage

### Basic usage

```js
import skift from 'skift';

// Configure Skift.
skift.config({
  tracking: {
      track: function(event, trackingData) {
          console.log('A/B test event: ' + event, trackingData);
      }
  }
});

// Describe the A/B Test.
skift
  .create('My awesome test')
  .setCondition(() => {
      return window.location.pathname === 'contacts'
  })
  .addVariation({
      name: 'A form with the new design',
      setup() {
          document.getElementsById('form').addClass('visible')
      }
  })
  .addVariation({
      name: 'Control'
  })
  .setup(); // Don't forget to setup the test!
```

## New to A/B testing?

We recommend using [Amplitude](https://amplitude.com/) for goal tracking.

## Contributing

Interested in contributing? Please have a look at our [developer documentation](CONTRIBUTING.md) for more information on how to get started.

Update readme with the logo
Update readme with the logo