Browse files

Merge pull request #141 from phoet/fix_some_examples

using strings as keys and fix one where a wrong key was used
  • Loading branch information...
2 parents 563d9e4 + e95b679 commit abb7355f2bda99b54c0364853ec2aa1c1f7e7c84 @andrew andrew committed Mar 7, 2013
Showing with 7 additions and 7 deletions.
  1. +7 −7 README.mdown
View
14 README.mdown
@@ -269,11 +269,11 @@ algorithm and if the experiment resets once finished:
```ruby
Split.configure do |config|
config.experiments = {
- :my_first_experiment => {
+ "my_first_experiment" => {
:alternatives => ["a", "b"],
:resettable => false
},
- :my_second_experiment => {
+ "my_second_experiment" => {
:algorithm => 'Split::Algorithms::Whiplash',
:alternatives => [
{ :name => "a", :percent => 67 },
@@ -311,13 +311,13 @@ my_second_experiment:
This simplifies the calls from your code:
```ruby
-ab_test(:my_first_experiment)
+ab_test("my_first_experiment")
```
and:
```ruby
-finished(:my_first_experiment)
+finished("my_first_experiment")
```
#### Metrics
@@ -330,7 +330,7 @@ the `:metric` option.
```ruby
Split.configure do |config|
config.experiments = {
- :my_first_experiment => {
+ "my_first_experiment" => {
:alternatives => ["a", "b"],
:metric => :conversion,
}
@@ -342,7 +342,7 @@ Your code may then track a completion using the metric instead of
the experiment name:
```ruby
-finished(:conversion)
+finished("my_first_experiment")
```
You can also create a new metric by instantiating and saving a new Metric object.
@@ -366,7 +366,7 @@ or you can you can define them in a configuration file:
```ruby
Split.configure do |config|
config.experiments = {
- :link_color => {
+ "link_color" => {
:alternatives => ["red", "blue"],
:goals => ["purchase", "refund"]
}

0 comments on commit abb7355

Please sign in to comment.