skift
TypeScript icon, indicating that this package has built-in type declarations

4.3.1 • Public • Published

Skift npm version Build Status semantic-release

A/B Testing tool for the modern Web

Usage

Basic usage

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.getElementById('form').addClass('visible')
        }
    })
    .addVariation({
        name: 'Control'
    })
    .setup(); // Don't forget to setup the test!

New to A/B testing?

We recommend using Amplitude for goal tracking.

Contributing

Interested in contributing? Please have a look at our developer documentation for more information on how to get started.

Readme

Keywords

none

Package Sidebar

Install

npm i skift

Weekly Downloads

205

Version

4.3.1

License

MIT

Unpacked Size

265 kB

Total Files

64

Last publish

Collaborators

  • trustpilot