sieve-js
v0.0.1
Published
Client side js sdk for Sieve A/B Testing framework
Downloads
2
Readme
sieve-js
Client side npm module for Sieve A/B Testing framework
Set up and integration
Install module using npm:
npm install sieve-js
Sample integration:
NOTE: Use webpack or browserify to compile for client side
var Sieve = require('sieve-js');
var client = new Sieve({
base_url: 'https://sieve-server-url'
});
client.allocate()
.then(function (experiments) {
console.log('allocated:', experiments);
// experiment-specific business logic goes here
return client.track('pay_btn_click', { pay_mode: 'credit card' });
})
.then(function () {
console.log('done');
})
.catch(function (err) {
console.log('oops', err.stack);
});