From 98e2a4c59e06f23233c06e9f619216e2a2578cf0 Mon Sep 17 00:00:00 2001 From: Eugene Korneev Date: Tue, 3 Feb 2015 17:59:17 +0300 Subject: [PATCH] Update README.md --- README.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f652b9a0..d7259800 100644 --- a/README.md +++ b/README.md @@ -455,8 +455,8 @@ my_first_experiment: meta: a: text: "Have a fantastic day" - b: - text: "Don't get hit by a bus" + b: + text: "Don't get hit by a bus" ``` This allows for some advanced experiment configuration using methods like: @@ -467,6 +467,15 @@ trial.alternative.name # => "a" trial.metadata['text'] # => "Have a fantastic day" ``` +or in views: + +```erb +<% ab_test("my_first_experiment") do |alternative, meta| %> + <%= alternative %> + <%= meta['text'] %> +<% end %> +``` + #### Metrics You might wish to track generic metrics, such as conversions, and use