Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@firstandthird/ab-test

Package Overview
Dependencies
Maintainers
6
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@firstandthird/ab-test

Simple A/B testing using Domodule and Micro Metrics

latest
Source
npmnpm
Version
2.0.0
Version published
Maintainers
6
Created
Source

AB Test npm

Simple A/B Testing library using Domodule and Micro Metrics

Installation

npm install @firstandthird/ab-test

Usage

JavaScript

import '@firstandthird/ab-test'

HTML

<body>
  <!-- Additional given data will be passed along too -->
  <div data-module="ABTest" data-module-name="backgroundColor" data-module-value="red">
    <a href="" data-action="success" data-action-text="Test">Test</a>
    <a href="" data-action="success" data-action-text="Foo">Foo</a>
  </div>

  <!-- If action is not defined, assume click on element -->
  <a href="" data-module="ABTest" data-module-name="ctaText" data-module-value="Sign up Now">Sign up now</a>
</body>

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.

Keywords

browser

FAQs

Package last updated on 12 Apr 2019

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