0.1.0 • Published 3 years ago

teamgantt-split-test v0.1.0

Weekly downloads
38
License
ISC
Repository
github
Last release
3 years ago

teamgantt-split-test

Using the split-test library

Recommended

  1. First import the library:
import {NAME_OF_SPLIT_TEST} from '/path/to/constants/split-test-experiments';
import tgSplitTest from 'teamgantt-split-test';
  1. Check if the user is in the split-test:
const isUserInSplitTest = tgSplitTest.isInExperiment(NAME_OF_SPLIT_TEST);

Note: If the user is not in the current split test, it will place them in the test and return their placement.

  1. The experiment should be handled in such a way that it follows the following logic:
if (isUserInSplitTest) {
    // the experiment, the current user should see the changes from the split test
} else {
    // the original, the current user should not see any changes
}

Using the JS file as a script tag:

  1. Import the split-test bundle:
<script language="javascript" src="https://split-test.teamgantt.com/index.js"></script>
  1. Check if the user is in the split-test:
var isUserInSplitTest = window.tgSplitTest.isInExperiment(NAME_OF_SPLIT_TEST);
  1. See step #3 above.
0.1.0

3 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago

1.0.0

5 years ago