optimize_ab 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/optimize_ab/helpers.rb +6 -6
- data/lib/optimize_ab/version.rb +1 -1
- metadata +1 -1
data/lib/optimize_ab/helpers.rb
CHANGED
@@ -20,7 +20,7 @@ module Helpers
|
|
20
20
|
# The control script immediately after the <head> tag.
|
21
21
|
#
|
22
22
|
#
|
23
|
-
# Page
|
23
|
+
# Page Sections Scripts
|
24
24
|
# ---------------------------------------
|
25
25
|
# The page sections script is used to mark
|
26
26
|
# the elements that will be varied during the experiment.
|
@@ -46,12 +46,12 @@ module Helpers
|
|
46
46
|
# = link_to (multi_begin_section('Headline') + "Welcome" + multi_end_section)
|
47
47
|
#
|
48
48
|
#
|
49
|
-
# OnClick Conversion
|
49
|
+
# OnClick Conversion
|
50
50
|
# ---------------------------------------
|
51
51
|
# You'll need to add a snippet of text to the link or links
|
52
52
|
# that you want to track as a conversion. Let's say your link
|
53
53
|
# looks like this:
|
54
|
-
#
|
54
|
+
#
|
55
55
|
# <a href="http://www.example.com/promotion">Featured Products</a>
|
56
56
|
#
|
57
57
|
# To count a conversion when this link is clicked, add:
|
@@ -73,7 +73,7 @@ module Helpers
|
|
73
73
|
|
74
74
|
######## Control / Tracking Script / Click Function ########
|
75
75
|
|
76
|
-
def
|
76
|
+
def ab_head(k, ua, pv)
|
77
77
|
js = <<-HTML
|
78
78
|
<script>
|
79
79
|
function utmx_section(){}function utmx(){}
|
@@ -110,14 +110,14 @@ module Helpers
|
|
110
110
|
|
111
111
|
######## Page Sections Scripts ########
|
112
112
|
|
113
|
-
def
|
113
|
+
def ab_section(name)
|
114
114
|
js = <<-HTML
|
115
115
|
<script>utmx_section("#{name}")</script>
|
116
116
|
HTML
|
117
117
|
return js.html_safe
|
118
118
|
end
|
119
119
|
|
120
|
-
def
|
120
|
+
def ab_section
|
121
121
|
js = <<-HTML
|
122
122
|
</noscript>
|
123
123
|
HTML
|
data/lib/optimize_ab/version.rb
CHANGED