ewe.js (yo͞o)
a/b testing for the front-end
Example
var ewe = ; //pick the ab test serviceewe; //create a new AB test caselaunchpadTest = ewe ; variation = launchpadTeststart; { launchpadTestcomplete; console;} { launchpadTestcomplete; console;} { }
API
.use(options)
service to use
group .group(uniqueId)
test group.test(name)
creates a new test case, or returns a given test if it's registered.
name
- name of the st
test.control(name, value)
the control test
test.variant(name [, options], value)
the test variation
options
- (optional) the options for the variantweight
- weight of the variation
value test.select([variationName])
selects a variation, and returns the given value.
value test.control()
returns the control test
variationName
- (optional) the variation to select
test.start
called after the test has failed
test.complete(error, success)
called after error / success