Mobile/Fennec/Android/Switchboard: Difference between revisions

From MozillaWiki
< Mobile‎ | Fennec‎ | Android
Jump to navigation Jump to search
(Created page with "[https://github.com/mozilla-services/switchboard-server Switchboard] is a service we use to segment users for A/B testing. == Usage == To use Switchboard to expose a new feat...")
 
Line 8: Line 8:
   }
   }


We also need to add the "yourexperimentname" name to the [https://github.com/mozilla-services/switchboard-server/blob/master/config/experiments.json Switchboard server config].
We also need to add the "yourexperimentname" name to the [https://github.com/mozilla-services/switchboard-experiments Switchboard server config].


== Examples ==
== Examples ==
* [http://hg.mozilla.org/mozilla-central/diff/3d97a673734c/mobile/android/base/firstrun/FirstrunPagerConfig.java#l24 First run panels experiment]
* [http://hg.mozilla.org/mozilla-central/diff/3d97a673734c/mobile/android/base/firstrun/FirstrunPagerConfig.java#l24 First run panels experiment]

Revision as of 20:14, 19 January 2016

Switchboard is a service we use to segment users for A/B testing.

Usage

To use Switchboard to expose a new feature to a portion of our users, use a code snippet like this:

 if (SwitchBoard.isInExperiment(this, "yourexperimentname")) {
   // Do something interesting.
 }

We also need to add the "yourexperimentname" name to the Switchboard server config.

Examples