🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

skift

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

skift

Split testing tool for the Web

4.3.1
latest
Source
npm
Version published
Weekly downloads
154
316.22%
Maintainers
1
Weekly downloads
 
Created
Source

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.

FAQs

Package last updated on 24 Nov 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts