Skip to content

Commit e2004b0

Browse files
committed
Added documentation for #293
1 parent 2cda35f commit e2004b0

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,28 @@ and:
445445
finished("my_first_experiment")
446446
```
447447

448+
You can also add meta data for each experiment, very useful when you need more than an alternative name to change behaviour:
449+
450+
```yaml
451+
my_first_experiment:
452+
alternatives:
453+
- a
454+
- b
455+
meta:
456+
a:
457+
text: "Have a fantastic day"
458+
b:
459+
text: "Don't get hit by a bus"
460+
```
461+
462+
This allows for some advanced experiment configuration using methods like:
463+
464+
```ruby
465+
trial.alternative.name # => "a"
466+
467+
trial.metadata['text'] # => "Have a fantastic day"
468+
```
469+
448470
#### Metrics
449471

450472
You might wish to track generic metrics, such as conversions, and use

0 commit comments

Comments
 (0)