vanity 1.8.3.beta2 → 1.8.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +1 -0
- data/CHANGELOG +18 -9
- data/Gemfile.lock +1 -1
- data/README.rdoc +34 -13
- data/gemfiles/rails3.gemfile.lock +1 -1
- data/gemfiles/rails31.gemfile.lock +1 -1
- data/gemfiles/rails32.gemfile.lock +1 -1
- data/gemfiles/rails4.gemfile.lock +1 -1
- data/lib/vanity/experiment/ab_test.rb +1 -1
- data/lib/vanity/version.rb +1 -1
- metadata +6 -6
data/.travis.yml
CHANGED
data/CHANGELOG
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
== 1.8.3 (2013-11-20)
|
2
|
+
|
3
|
+
Add support for Rails 4. (@phillbaker)
|
4
|
+
Update redis gem depedendencies. (@phillbaker)
|
5
|
+
Add Bayesian multi-armed bandit scoring for experiments as an alternative to the standard A/B calculations, as well as periodic alternative rebalancing based on alternative performance (@lotze).
|
6
|
+
Add 'complete' UI functionality to the dashboard to complete an experiment from the rails web interface (@lotze).
|
7
|
+
Gem maintenance: license specification to gemspec, remove .rvmrc file (@phillbaker).
|
8
|
+
Add #ab_assigned to adapters: to get an array of the experiments a specific identity is assigned to, as well as a controller action to display those assignments (@lotze).
|
9
|
+
|
1
10
|
== 1.8.2 (2013-10-27)
|
2
11
|
|
3
12
|
Optimize metric_values query (@zawaideh).
|
@@ -26,9 +35,9 @@ Allow for table names in specified :timestamps (Peter Kovacs)
|
|
26
35
|
|
27
36
|
When a named scope includes a join, created_at can be ambiguous. Use
|
28
37
|
|
29
|
-
|
30
|
-
|
31
|
-
|
38
|
+
metric "Sky is limit" do
|
39
|
+
model Sky, :timestamp => 'skies.created_at'
|
40
|
+
end
|
32
41
|
|
33
42
|
to disambiguate.
|
34
43
|
|
@@ -48,12 +57,12 @@ connections are deprecated in favor of using the connection option with a URI
|
|
48
57
|
|
49
58
|
1.7.0 adds support for ActionMailer, for example:
|
50
59
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
60
|
+
class UserMailer < ActionMailer::Base
|
61
|
+
def invite_email(user)
|
62
|
+
use_vanity_mailer user
|
63
|
+
mail :to => user.email, :subject => ab_test(:invite_subject)
|
64
|
+
end
|
65
|
+
end
|
57
66
|
|
58
67
|
See the documentation for more details.
|
59
68
|
|
data/Gemfile.lock
CHANGED
data/README.rdoc
CHANGED
@@ -25,16 +25,12 @@ http://farm3.static.flickr.com/2540/4099665871_497f274f68_o.jpg
|
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
28
|
-
===== Rails 3 installation
|
28
|
+
===== Rails 3 & Rails 4 installation
|
29
29
|
|
30
30
|
Add to your Gemfile:
|
31
31
|
|
32
32
|
gem "vanity"
|
33
33
|
|
34
|
-
===== Rails 4 installation
|
35
|
-
|
36
|
-
Coming soon!
|
37
|
-
|
38
34
|
==== Step 1.2
|
39
35
|
|
40
36
|
Choose a method to store experiment results: for Redis or an external tracking mechanism, migrations aren't needed. Mongo is also available. To use a relational database, via ActiveRecord, run the generator and migrations to create the database schema:
|
@@ -68,6 +64,8 @@ NOTE: If using a metric as above ("signups"), there needs to be a corresponding
|
|
68
64
|
|
69
65
|
=== <b>Step 4:</b> Measure conversion
|
70
66
|
|
67
|
+
Conversions are created via the <code>track!</code> method. For example:
|
68
|
+
|
71
69
|
class SignupController < ApplicationController
|
72
70
|
def signup
|
73
71
|
@account = Account.new(params[:account])
|
@@ -84,28 +82,51 @@ NOTE: If using a metric as above ("signups"), there needs to be a corresponding
|
|
84
82
|
|
85
83
|
vanity report --output vanity.html
|
86
84
|
|
87
|
-
|
85
|
+
To view metrics and experiment results with the dashboard in Rails 3 & Rails 4:
|
86
|
+
|
87
|
+
rails generate controller Vanity
|
88
|
+
|
89
|
+
In <code>config/routes.rb</code>, add:
|
90
|
+
|
91
|
+
match '/vanity(/:action(/:id(.:format)))', :controller => :vanity, :via => :get
|
92
|
+
|
93
|
+
Where the controller should looks like:
|
94
|
+
|
95
|
+
class VanityController < ApplicationController
|
96
|
+
include Vanity::Rails::Dashboard
|
97
|
+
end
|
98
|
+
|
99
|
+
NOTE: By default, Vanity turns collection off in development mode. To turn it on, in <code>config/environments/development.rb</code> add:
|
100
|
+
|
101
|
+
Vanity.playground.collecting = true
|
88
102
|
|
89
103
|
== Registering participants with Javascript
|
90
104
|
|
91
105
|
If robots or spiders make up a significant portion of your sites traffic they can affect your conversion rate. Vanity can optionally add participants to the experiments using asynchronous javascript callbacks, which will keep almost all robots out. To set this up simply do the following:
|
92
106
|
|
93
|
-
* Add Vanity.playground.use_js
|
94
|
-
* Set Vanity.playground.add_participant_path = '/path/to/vanity/action'
|
95
|
-
* Add
|
107
|
+
* Add <code>Vanity.playground.use_js!</code>
|
108
|
+
* Set <code>Vanity.playground.add_participant_path = '/path/to/vanity/action'</code>, this should point to the add_participant path that is added with Vanity::Rails::Dashboard, make sure that this action is available to all users
|
109
|
+
* Add <code><%= vanity_js %></code> to any page that needs uses an ab_test. <code>vanity_js</code> needs to be included after your call to ab_test so that it knows which version of the experiment the participant is a member of. The helper will render nothing if the there are no ab_tests running on the current page, so adding <code>vanity_js</code> to the bottom of your layouts is a good option. Keep in mind that if you call <code>use_js!</code> and don't include <code>vanity_js</code> in your view no participants will be recorded.
|
96
110
|
|
97
|
-
== Compatibility
|
111
|
+
== Compatibility
|
98
112
|
|
99
113
|
Here's what's tested and known to work:
|
100
114
|
|
101
|
-
Ruby 1.8.7
|
115
|
+
Ruby 1.8.7
|
102
116
|
Persistence: Redis, Mongo, ActiveRecord
|
103
117
|
Rails: 2.3, 3, 3.1, 3.2
|
118
|
+
Ruby 1.9.3
|
119
|
+
Persistence: Redis, Mongo, ActiveRecord
|
120
|
+
Rails: 3, 3.1, 3.2, 4.0
|
104
121
|
Ruby 2.0
|
105
122
|
Persistence: Redis, Mongo, ActiveRecord
|
106
|
-
Rails: 3.2
|
123
|
+
Rails: 3.2, 4.0
|
124
|
+
|
125
|
+
== Testing
|
126
|
+
|
127
|
+
For view tests/specs or integration testing, it's handy to set the outcome of an experiment. This may be done using the <code>chooses</code> method. For example:
|
107
128
|
|
108
|
-
|
129
|
+
Vanity.playground.experiment(:price_options).chooses(19)
|
109
130
|
|
110
131
|
== Contributing
|
111
132
|
|
@@ -85,7 +85,7 @@ module Vanity
|
|
85
85
|
end
|
86
86
|
|
87
87
|
# What method to use for calculating score. Default is :ab_test, but can
|
88
|
-
# also be set to :
|
88
|
+
# also be set to :bayes_bandit_score to calculate probability of each
|
89
89
|
# alternative being the best.
|
90
90
|
#
|
91
91
|
# @example Define A/B test which uses bayes_bandit_score in reporting
|
data/lib/vanity/version.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vanity
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.3
|
5
|
-
prerelease:
|
4
|
+
version: 1.8.3
|
5
|
+
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Assaf Arkin
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-11-
|
12
|
+
date: 2013-11-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: redis
|
@@ -196,7 +196,7 @@ licenses:
|
|
196
196
|
post_install_message: To get started run vanity --help
|
197
197
|
rdoc_options:
|
198
198
|
- --title
|
199
|
-
- Vanity 1.8.3
|
199
|
+
- Vanity 1.8.3
|
200
200
|
- --main
|
201
201
|
- README.rdoc
|
202
202
|
- --webcvs
|
@@ -212,9 +212,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
212
212
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
213
213
|
none: false
|
214
214
|
requirements:
|
215
|
-
- - ! '
|
215
|
+
- - ! '>='
|
216
216
|
- !ruby/object:Gem::Version
|
217
|
-
version:
|
217
|
+
version: '0'
|
218
218
|
requirements: []
|
219
219
|
rubyforge_project:
|
220
220
|
rubygems_version: 1.8.23
|