README.md in field_test-0.1.0 vs README.md in field_test-0.1.1

- old
+ new

@@ -4,10 +4,12 @@ - Designed for web and email - Seamlessly handles the transition from anonymous visitor to logged in user - Results are stored in your database +Uses [Bayesian methods](http://www.evanmiller.org/bayesian-ab-testing.html) to evaluate results so you don’t need to choose a sample size ahead of time. + ## Installation Add this line to your application’s Gemfile: ```ruby @@ -18,21 +20,29 @@ ```sh rails g field_test:install ``` +And mount the dashboard in your `config/routes.rb`: + +```ruby +mount FieldTest::Engine, at: "field_test" +``` + +Be sure to [secure the dashboard](#security) in production. + ## Getting Started Add an experiment to `config/field_test.yml`. ```yml experiments: button_color: variants: - - control - red - green + - blue ``` Refer to it in views, controllers, and mailers. ```ruby @@ -74,21 +84,50 @@ ```ruby field_test(:button_color, participant: "test@example.org") ``` +Keep track of when experiments started and ended. + +```yml +experiments: + button_colors: + started_at: 2016-12-01 14:00:00 + ended_at: 2016-12-08 14:00:00 +``` + ## Funnels For advanced funnels, we recommend an analytics platform like [Ahoy](https://github.com/ankane/ahoy) or [Mixpanel](https://mixpanel.com/). You can pass experiments and variants as properties. +## Security + +#### Basic Authentication + +Set the following variables in your environment or an initializer. + +```ruby +ENV["FIELD_TEST_USERNAME"] = "link" +ENV["FIELD_TEST_PASSWORD"] = "hyrule" +``` + +#### Devise + +```ruby +authenticate :user, -> (user) { user.admin? } do + mount FieldTest::Engine, at: "field_test" +end +``` + +## Credits + +A huge thanks to [Evan Miller](http://www.evanmiller.org/) for deriving the Bayesian formulas. + ## TODO -- Add confidence to stats -- Add [Bayesian confidence](http://www.evanmiller.org/bayesian-ab-testing.html) to results - Exclude bots -- User interface ## History View the [changelog](https://github.com/ankane/field_test/blob/master/CHANGELOG.md)