@saber2pr/ab-test

ab test in browser.

Usage no npm install needed!

<script type="module">
  import saber2prAbTest from 'https://cdn.skypack.dev/@saber2pr/ab-test';
</script>

README

@saber2pr/ab-test

ab test in browser.

Usage

import ABTest from '@saber2pr/ab-test'

const test = new ABTest()

// by custom id, like session-id、jwt-token
test.getAB('your id') // 'A' | 'B'

// by fingerprint
test.getVisitorAB() // Promise<'A' | 'B'>

Reference

  1. google/google-analytics
  2. fingerprintjs/fingerprintjs
  3. tcollinsworth/ab-test-selector