mountain-goat 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/flotilla.rb +169 -0
- data/lib/mountain_goat/controllers/mountain_goat/mountain_goat_controller.rb +11 -1
- data/lib/mountain_goat/metric_tracking.rb +2 -1
- data/lib/mountain_goat/public/containerbg.png +0 -0
- data/lib/mountain_goat/public/dirtyred.png +0 -0
- data/lib/mountain_goat/public/dottedblack.png +0 -0
- data/lib/mountain_goat/public/dottedblue.png +0 -0
- data/lib/mountain_goat/public/jquery.flot.js +2615 -0
- data/lib/mountain_goat/public/mg.css +334 -0
- data/lib/mountain_goat/public/mg.png +0 -0
- data/lib/mountain_goat/public/raster.png +0 -0
- data/lib/mountain_goat/version.rb +1 -1
- data/lib/mountain_goat/views/mountain_goat/layouts/.tmp_mountain_goat.html.erb.2801~ +53 -0
- data/lib/mountain_goat/views/mountain_goat/layouts/mountain_goat.html.erb +16 -21
- data/lib/mountain_goat/views/mountain_goat/mountain_goat_converts/.tmp_index.html.erb.67861~ +33 -0
- data/lib/mountain_goat/views/mountain_goat/mountain_goat_converts/.tmp_index.html.erb.97796~ +49 -0
- data/lib/mountain_goat/views/mountain_goat/mountain_goat_converts/index.html.erb +37 -21
- data/lib/mountain_goat/views/mountain_goat/mountain_goat_metric_variants/.tmp_show.html.erb.24381~ +14 -0
- data/lib/mountain_goat/views/mountain_goat/mountain_goat_metrics/.tmp_show.html.erb.21427~ +59 -0
- data/lib/mountain_goat/views/mountain_goat/mountain_goat_metrics/.tmp_show.html.erb.65988~ +59 -0
- data/lib/mountain_goat/views/mountain_goat/mountain_goat_metrics/show.html.erb +49 -36
- data/mountain-goat-0.0.3.gem +0 -0
- data/mountain-goat-0.0.4.gem +0 -0
- metadata +21 -4
@@ -0,0 +1,59 @@
|
|
1
|
+
|
2
|
+
<% if !respond_to?(:chart) %>
|
3
|
+
<% def chart(*args); 'Please install Flotilla plugin (http://flotilla.rubyforge.org/) for charts'; end; %>
|
4
|
+
<% end %>
|
5
|
+
|
6
|
+
<div id="container-main" class="mt-metrics">
|
7
|
+
<div class="mountain-goat-panel cenetered">
|
8
|
+
<a href="<%= mountain_goat_converts_url %>">Goals</a> > <a href="<%= mountain_goat_convert_url :id => @metric.convert.id %>"><%=h @metric.convert.name %> Goal</a> > <span class="metric-type"><%=h @metric.metric_type %></span>
|
9
|
+
|
10
|
+
<h2><%=h @metric.title %></h2>
|
11
|
+
|
12
|
+
<div class="variants">
|
13
|
+
<% if @metric.metric_variants.count == 0 %>
|
14
|
+
<span class="none">No metric variants</span>
|
15
|
+
<% else %>
|
16
|
+
<div class="flyer-analysis countbar">
|
17
|
+
<div class="title">Conversion Rates</div>
|
18
|
+
<div class="graph">
|
19
|
+
<%= chart("analysis_graph#{@metric.id}",
|
20
|
+
{ "Served" => { :collection => @rates[:served], :x => :variant_type, :y => :value },
|
21
|
+
"Conversions" => { :collection => @rates[:conversions], :x => :variant_type, :y => :value } },
|
22
|
+
{ :xaxis => {:autoscaleMargin => 0.1, :ticks => @rates[:titles].map { |i,t| [i + 0.5, t] }.sort }, :yaxis => { :min => 0, :minTickSize => 1 }, :bars => { :show => true }, :legend => { :position => "ne" } }, :placeholder_size => "300x200") %>
|
23
|
+
|
24
|
+
</div>
|
25
|
+
<div class="graph">
|
26
|
+
<%= chart("analysis_conv_graph#{@metric.id}",
|
27
|
+
{ "Conversion Rate (%)" => { :collection => @rates[:conversion_rates], :x => :variant_type, :y => :value } },
|
28
|
+
{ :xaxis => {:autoscaleMargin => 0.1, :ticks => @rates[:titles].map { |i,t| [i + 0.5, t] }.sort }, :yaxis => { :min => 0, :minTickSize => 1 }, :bars => { :show => true }, :legend => { :position => "ne" } }, :placeholder_size => "300x200") %>
|
29
|
+
|
30
|
+
</div>
|
31
|
+
</div>
|
32
|
+
<% @metric.metric_variants.each do |mv| %>
|
33
|
+
<div class="metric-variant">
|
34
|
+
<div class="item name">
|
35
|
+
<span class="desc">Name</span>
|
36
|
+
<span class="val"><a href="<%= mountain_goat_metric_variant_url mv %>"><%= mv.name %></a> [<a href="<%= edit_mountain_goat_metric_variant_url :id => mv.id %>">Edit</a>]</span>
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<div class="item value">
|
40
|
+
<span class="desc">Value</span>
|
41
|
+
<span class="val"><%= mv.value %></span>
|
42
|
+
</div>
|
43
|
+
|
44
|
+
<div class="item rate">
|
45
|
+
<span class="rates">Conversion:</span>
|
46
|
+
<span class="conversions"><%= mv.conversions %></span> /
|
47
|
+
<span class="served"><%= mv.served %></span>
|
48
|
+
(<span class="val"><%= number_to_percentage(mv.conversion_rate, :precision => 0) %></span>)
|
49
|
+
</div>
|
50
|
+
</div>
|
51
|
+
|
52
|
+
<% end %>
|
53
|
+
<% end %>
|
54
|
+
</div>
|
55
|
+
|
56
|
+
<a href="<%= edit_mountain_goat_metric_url :id => @metric %>">Edit Metric</a> |
|
57
|
+
<a href="<%= new_mountain_goat_metric_mountain_goat_metric_variant_url :mountain_goat_metric_id => @metric.id %>">New Variant</a>
|
58
|
+
</div>
|
59
|
+
</div>
|
@@ -5,55 +5,68 @@
|
|
5
5
|
|
6
6
|
<div id="container-main" class="mt-metrics">
|
7
7
|
<div class="mountain-goat-panel cenetered">
|
8
|
-
<
|
8
|
+
<ul class="nav">
|
9
|
+
<li><a href="<%= mountain_goat_converts_url %>">Goals</a></li>
|
10
|
+
<li><a href="<%= mountain_goat_convert_url :id => @metric.convert.id %>"><%=h @metric.convert.name %> Goal</a></li>
|
11
|
+
<li><a href="<%= mountain_goat_metric_url :id => @metric.id %>"><%=h @metric.title %></a></li>
|
12
|
+
</ul>
|
9
13
|
|
10
|
-
<
|
14
|
+
<h1><%=h @metric.title %> Goal</h1>
|
11
15
|
|
12
16
|
<div class="variants">
|
13
17
|
<% if @metric.metric_variants.count == 0 %>
|
14
18
|
<span class="none">No metric variants</span>
|
15
19
|
<% else %>
|
16
|
-
<div class="
|
17
|
-
<div class="
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
"
|
22
|
-
|
23
|
-
|
24
|
-
</div>
|
25
|
-
<div class="graph">
|
26
|
-
<%= chart("analysis_conv_graph#{@metric.id}",
|
27
|
-
{ "Conversion Rate (%)" => { :collection => @rates[:conversion_rates], :x => :variant_type, :y => :value } },
|
28
|
-
{ :xaxis => {:autoscaleMargin => 0.1, :ticks => @rates[:titles].map { |i,t| [i + 0.5, t] }.sort }, :yaxis => { :min => 0, :minTickSize => 1 }, :bars => { :show => true }, :legend => { :position => "ne" } }, :placeholder_size => "300x200") %>
|
29
|
-
|
30
|
-
</div>
|
31
|
-
</div>
|
32
|
-
<% @metric.metric_variants.each do |mv| %>
|
33
|
-
<div class="metric-variant">
|
34
|
-
<div class="item name">
|
35
|
-
<span class="desc">Name</span>
|
36
|
-
<span class="val"><a href="<%= mountain_goat_metric_variant_url mv %>"><%= mv.name %></a> [<a href="<%= edit_mountain_goat_metric_variant_url :id => mv.id %>">Edit</a>]</span>
|
37
|
-
</div>
|
20
|
+
<div class="statpads">
|
21
|
+
<div class="flyer-analysis statpad">
|
22
|
+
<div class="title">Conversions</div>
|
23
|
+
<div class="statbody">
|
24
|
+
<%= chart("analysis_graph#{@metric.id}",
|
25
|
+
{ "Served" => { :collection => @rates[:served], :x => :variant_type, :y => :value },
|
26
|
+
"Conversions" => { :collection => @rates[:conversions], :x => :variant_type, :y => :value } },
|
27
|
+
{ :xaxis => { :ticks => @rates[:titles].map { |i,t| [i + 0.5, t] }.sort }, :yaxis => { :min => 0, :minTickSize => 1 }, :bars => { :show => true }, :legend => { :show => false, :position => "ne" }, :grid => { :hoverable => true, :clickable => true }, :inline => false }, :placeholder_size => "420x260", :pie_hover => true, :line_hover_absolute => true, :item_title => "view(s)") %>
|
38
28
|
|
39
|
-
<div class="item value">
|
40
|
-
<span class="desc">Value</span>
|
41
|
-
<span class="val"><%= mv.value %></span>
|
42
29
|
</div>
|
30
|
+
</div>
|
31
|
+
<div class="flyer-analysis statpad">
|
32
|
+
<div class="title">Conversion Rates</div>
|
33
|
+
<div class="statbody">
|
34
|
+
<%= chart("analysis_conv_graph#{@metric.id}",
|
35
|
+
{ "Conversion Rate (%)" => { :collection => @rates[:conversion_rates], :x => :variant_type, :y => :value } },
|
36
|
+
{ :xaxis => { :ticks => @rates[:titles].map { |i,t| [i + 0.5, t] }.sort }, :yaxis => { :min => 0, :minTickSize => 1 }, :bars => { :show => true }, :legend => { :show => false, :position => "ne" }, :grid => { :hoverable => true, :clickable => true }, :inline => false }, :placeholder_size => "420x260", :pie_hover => true, :line_hover_absolute => true, :item_title => "%") %>
|
43
37
|
|
44
|
-
<div class="item rate">
|
45
|
-
<span class="rates">Conversion:</span>
|
46
|
-
<span class="conversions"><%= mv.conversions %></span> /
|
47
|
-
<span class="served"><%= mv.served %></span>
|
48
|
-
(<span class="val"><%= number_to_percentage(mv.conversion_rate, :precision => 0) %></span>)
|
49
38
|
</div>
|
50
39
|
</div>
|
51
|
-
|
52
|
-
|
40
|
+
</div>
|
41
|
+
|
42
|
+
|
43
|
+
<div class="metric-category">
|
44
|
+
<span class="metric"><a href="<%= mountain_goat_metric_url :id => @metric.id %>"><%= @metric.title %></a></span>
|
45
|
+
<% if @metric.metric_variants.count == 0 %>
|
46
|
+
<span class="none">No metric variants [<a href="<%= new_mountain_goat_metric_mountain_goat_metric_variant_url :mountain_goat_metric_id => @metric.id %>">Add one</a>]</span>
|
47
|
+
<% else %>
|
48
|
+
<% @metric.metric_variants.each do |mv| %>
|
49
|
+
<div class="item rate">
|
50
|
+
<span class="rate-holder">
|
51
|
+
<span class="title"><a href="<%= mountain_goat_metric_variant_url mv %>"><%=h mv.name %></a></span>
|
52
|
+
<span class="rates" style="width:<%= number_to_percentage(mv.conversion_rate, :precision => 0) %>"></span>
|
53
|
+
</span>
|
54
|
+
|
55
|
+
<span class="percent-holder">
|
56
|
+
<span class="val"><%= number_to_percentage(mv.conversion_rate, :precision => 0) %></span>
|
57
|
+
(<span class="conversions"><%= mv.conversions %></span> /
|
58
|
+
<span class="served"><%= mv.served %></span>)
|
59
|
+
</span>
|
60
|
+
</div>
|
61
|
+
<% end %>
|
62
|
+
<% end %>
|
63
|
+
</div>
|
53
64
|
<% end %>
|
54
65
|
</div>
|
55
66
|
|
56
|
-
<
|
57
|
-
|
67
|
+
<div class="actions">
|
68
|
+
<a class="button" href="<%= edit_mountain_goat_metric_url :id => @metric %>">Edit Metric</a>
|
69
|
+
<a class="button" href="<%= new_mountain_goat_metric_mountain_goat_metric_variant_url :mountain_goat_metric_id => @metric.id %>">New Variant</a>
|
70
|
+
</div>
|
58
71
|
</div>
|
59
72
|
</div>
|
Binary file
|
Binary file
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mountain-goat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 5
|
10
|
+
version: 0.0.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Geoffrey Hayes
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-07-
|
19
|
+
date: 2011-07-08 00:00:00 -05:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
@@ -70,6 +70,7 @@ files:
|
|
70
70
|
- Rakefile
|
71
71
|
- init.rb
|
72
72
|
- install.rb
|
73
|
+
- lib/flotilla.rb
|
73
74
|
- lib/mountain_goat.rb
|
74
75
|
- lib/mountain_goat/controllers/mountain_goat/mountain_goat_controller.rb
|
75
76
|
- lib/mountain_goat/controllers/mountain_goat/mountain_goat_converts_controller.rb
|
@@ -84,9 +85,20 @@ files:
|
|
84
85
|
- lib/mountain_goat/models/metric.rb
|
85
86
|
- lib/mountain_goat/models/metric_variant.rb
|
86
87
|
- lib/mountain_goat/models/rally.rb
|
88
|
+
- lib/mountain_goat/public/containerbg.png
|
89
|
+
- lib/mountain_goat/public/dirtyred.png
|
90
|
+
- lib/mountain_goat/public/dottedblack.png
|
91
|
+
- lib/mountain_goat/public/dottedblue.png
|
92
|
+
- lib/mountain_goat/public/jquery.flot.js
|
93
|
+
- lib/mountain_goat/public/mg.css
|
94
|
+
- lib/mountain_goat/public/mg.png
|
95
|
+
- lib/mountain_goat/public/raster.png
|
87
96
|
- lib/mountain_goat/switch_variant.rb
|
88
97
|
- lib/mountain_goat/version.rb
|
98
|
+
- lib/mountain_goat/views/mountain_goat/layouts/.tmp_mountain_goat.html.erb.2801~
|
89
99
|
- lib/mountain_goat/views/mountain_goat/layouts/mountain_goat.html.erb
|
100
|
+
- lib/mountain_goat/views/mountain_goat/mountain_goat_converts/.tmp_index.html.erb.67861~
|
101
|
+
- lib/mountain_goat/views/mountain_goat/mountain_goat_converts/.tmp_index.html.erb.97796~
|
90
102
|
- lib/mountain_goat/views/mountain_goat/mountain_goat_converts/_convert_form.html.erb
|
91
103
|
- lib/mountain_goat/views/mountain_goat/mountain_goat_converts/_convert_meta_type_form.html.erb
|
92
104
|
- lib/mountain_goat/views/mountain_goat/mountain_goat_converts/edit.html.erb
|
@@ -94,11 +106,14 @@ files:
|
|
94
106
|
- lib/mountain_goat/views/mountain_goat/mountain_goat_converts/new.html.erb
|
95
107
|
- lib/mountain_goat/views/mountain_goat/mountain_goat_converts/show.html.erb
|
96
108
|
- lib/mountain_goat/views/mountain_goat/mountain_goat_metric_variants/.tmp__metric_variant_form.html.erb.87465~
|
109
|
+
- lib/mountain_goat/views/mountain_goat/mountain_goat_metric_variants/.tmp_show.html.erb.24381~
|
97
110
|
- lib/mountain_goat/views/mountain_goat/mountain_goat_metric_variants/_metric_variant_form.html.erb
|
98
111
|
- lib/mountain_goat/views/mountain_goat/mountain_goat_metric_variants/edit.html.erb
|
99
112
|
- lib/mountain_goat/views/mountain_goat/mountain_goat_metric_variants/index.html.erb
|
100
113
|
- lib/mountain_goat/views/mountain_goat/mountain_goat_metric_variants/new.html.erb
|
101
114
|
- lib/mountain_goat/views/mountain_goat/mountain_goat_metric_variants/show.html.erb
|
115
|
+
- lib/mountain_goat/views/mountain_goat/mountain_goat_metrics/.tmp_show.html.erb.21427~
|
116
|
+
- lib/mountain_goat/views/mountain_goat/mountain_goat_metrics/.tmp_show.html.erb.65988~
|
102
117
|
- lib/mountain_goat/views/mountain_goat/mountain_goat_metrics/_metric_form.html.erb
|
103
118
|
- lib/mountain_goat/views/mountain_goat/mountain_goat_metrics/edit.html.erb
|
104
119
|
- lib/mountain_goat/views/mountain_goat/mountain_goat_metrics/index.html.erb
|
@@ -107,6 +122,8 @@ files:
|
|
107
122
|
- migrations/20090716093747_create_metric_tracking_tables.rb
|
108
123
|
- mountain-goat-0.0.1.gem
|
109
124
|
- mountain-goat-0.0.2.gem
|
125
|
+
- mountain-goat-0.0.3.gem
|
126
|
+
- mountain-goat-0.0.4.gem
|
110
127
|
- mountain-goat.gemspec
|
111
128
|
has_rdoc: true
|
112
129
|
homepage: http://github.com/hayesgm/mountain-goat
|