README.md in field_test-0.1.2 vs README.md in field_test-0.2.0
- old
+ new
@@ -1,12 +1,12 @@
# Field Test
:maple_leaf: A/B testing for Rails
- Designed for web and email
+- Comes with a [nice dashboard](https://fieldtest.dokkuapp.com/)
- 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
@@ -28,11 +28,11 @@
mount FieldTest::Engine, at: "field_test"
```
Be sure to [secure the dashboard](#security) in production.
-![Screenshot](https://ankane.github.io/field_test/screenshot5.png)
+![Screenshot](https://ankane.github.io/field_test/screenshot6.png)
## Getting Started
Add an experiment to `config/field_test.yml`.
@@ -55,17 +55,10 @@
```ruby
field_test_converted(:button_color)
```
-Get the results with:
-
-```ruby
-experiment = FieldTest::Experiment.find(:button_color)
-experiment.results
-```
-
When an experiment is over, specify a winner:
```yml
experiments:
button_color:
@@ -84,43 +77,42 @@
Assign a specific variant to a user with:
```ruby
experiment = FieldTest::Experiment.find(:button_color)
-experiment.variant(user, variant: "red")
+experiment.variant(participant, variant: "red")
```
-Specify a participant with:
-
-```ruby
-field_test(:button_color, participant: "test@example.org")
-```
-
-You can pass an object as well.
-
-```ruby
-field_test(:button_color, participant: user)
-```
-
## Config
By default, bots are returned the first variant and excluded from metrics. Change this with:
```yml
exclude:
bots: false
```
-Keep track of when experiments started and ended.
+Keep track of when experiments started and ended. Use any format `Time.parse` accepts.
```yml
experiments:
button_color:
- started_at: 2016-12-01 14:00:00
- ended_at: 2016-12-08 14:00:00
+ started_at: Dec 1, 2016 8 am PST
+ ended_at: Dec 8, 2016 2 pm PST
```
+Add a friendlier name and description with:
+
+```yml
+experiments:
+ button_color:
+ name: Buttons!
+ description: >
+ Different button colors
+ for the landing page.
+```
+
By default, variants are given the same probability of being selected. Change this with:
```yml
experiments:
button_color:
@@ -130,10 +122,18 @@
weights:
- 90
- 10
```
+If the dashboard gets slow, you can make it faster with:
+
+```yml
+cache: true
+```
+
+This will use the Rails cache to speed up winning probability calculations.
+
## Funnels
For advanced funnels, we recommend an analytics platform like [Ahoy](https://github.com/ankane/ahoy) or [Mixpanel](https://mixpanel.com/).
You can use:
@@ -144,24 +144,24 @@
to get all experiments and variants for a participant, and pass them as properties.
## Security
+#### Devise
+
+```ruby
+authenticate :user, -> (user) { user.admin? } do
+ mount FieldTest::Engine, at: "field_test"
+end
+```
+
#### Basic Authentication
Set the following variables in your environment or an initializer.
```ruby
ENV["FIELD_TEST_USERNAME"] = "moonrise"
ENV["FIELD_TEST_PASSWORD"] = "kingdom"
-```
-
-#### 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.