README.md in field_test-0.1.1 vs README.md in field_test-0.1.2
- old
+ new
@@ -14,11 +14,11 @@
```ruby
gem 'field_test'
```
-And run:
+Run:
```sh
rails g field_test:install
```
@@ -28,10 +28,12 @@
mount FieldTest::Engine, at: "field_test"
```
Be sure to [secure the dashboard](#security) in production.
+![Screenshot](https://ankane.github.io/field_test/screenshot5.png)
+
## Getting Started
Add an experiment to `config/field_test.yml`.
```yml
@@ -68,50 +70,91 @@
experiments:
button_color:
winner: red
```
-All calls to `field_test` will now return the winner.
+All calls to `field_test` will now return the winner, and metrics will stop being recorded.
## Features
You can specify a variant with query parameters to make testing easier
```
http://localhost:3000/?field_test[button_color]=red
```
-For mailers, you need to specify a participant:
+Assign a specific variant to a user with:
```ruby
+experiment = FieldTest::Experiment.find(:button_color)
+experiment.variant(user, 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.
```yml
experiments:
- button_colors:
+ button_color:
started_at: 2016-12-01 14:00:00
ended_at: 2016-12-08 14:00:00
```
+By default, variants are given the same probability of being selected. Change this with:
+
+```yml
+experiments:
+ button_color:
+ variants:
+ - red
+ - blue
+ weights:
+ - 90
+ - 10
+```
+
## 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.
+You can use:
+```ruby
+field_test_experiments
+```
+
+to get all experiments and variants for a participant, and pass them 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"
+ENV["FIELD_TEST_USERNAME"] = "moonrise"
+ENV["FIELD_TEST_PASSWORD"] = "kingdom"
```
#### Devise
```ruby
@@ -121,13 +164,9 @@
```
## Credits
A huge thanks to [Evan Miller](http://www.evanmiller.org/) for deriving the Bayesian formulas.
-
-## TODO
-
-- Exclude bots
## History
View the [changelog](https://github.com/ankane/field_test/blob/master/CHANGELOG.md)