On Github cdriscol / ct-hackathon-presentation
Chris Driscol & Steve Tyree
if(featureFlags.isOn('fuzzy-router')) { //.. do stuffs }
user creation
function showCreateUser(user, trackers) { if(featureFlags.isOn('ST01B')) { // navigate to page } else { // show dialog } }
function showCreateUser(user, trackers) { var experiment = 'ST01: Admin User Create', variant = 'ST01A: Admin User Create Modal', timeTracker = trackers.get(experiment, variant, 'Time on Page'), saveTracker = trackers.get(experiment, variant, 'Saved User'); if(featureFlags.isOn('ST01B')) { // ... } else { timeTracker.trackPromise( // <- tracks how long the dialog is open UserCreateDialog.show() .then(function(user) { saveTracker.trackEvent(1); // <- tracks save }).catch(function() { saveTracker.trackEvent(0); // <- tracks non-save })); } }