mountain-goat 0.0.15 → 0.0.16

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.
@@ -35,9 +35,9 @@ class Rally < ActiveRecord::Base
35
35
  self.convert_meta_types.each do |cmt|
36
36
  r = res.count
37
37
  begin
38
- if cmt.var =~ /(\w)[_]id/i
39
- if $1.classify
40
- item = $1.classify.find( cmt.var )
38
+ if cmt.var =~ /(\w+)[_]id/i
39
+ if Kernel.const_get($1.classify)
40
+ item = Kernel.const_get($1.classify).find( self.meta_for( cmt.var ) )
41
41
  if item.respond_to?(:name)
42
42
  res.merge!({ $1 => item.name })
43
43
  elsif item.respond_to?(:title)
@@ -46,8 +46,9 @@ class Rally < ActiveRecord::Base
46
46
  end
47
47
  end
48
48
  rescue
49
- end
50
- res.merge!({ cmt.var => rally.meta( cmt.var ) }) if res.count == r
49
+ end
50
+
51
+ res.merge!({ cmt.var => self.meta_for( cmt.var ) }) if res.count == r
51
52
  end
52
53
 
53
54
  res
@@ -1,3 +1,3 @@
1
1
  class MountainGoat
2
- VERSION = "0.0.15"
2
+ VERSION = "0.0.16"
3
3
  end
@@ -0,0 +1,22 @@
1
+
2
+
3
+ <div id="container-main" class="mt-rallies">
4
+ <div class="mountain-goat-panel">
5
+ <h1>Rallies <% if @convert %>for <%=h @convert.name %><% else %>for all Goals<% end %></h1>
6
+
7
+ <% if @rallies.count > 0 %>
8
+ <ul>
9
+ <% @rallies.each do |rally| %>
10
+ <li><%= rally.convert.name %> at <%= rally.created_at.to_s %></li>
11
+ (
12
+ <% rally.all_metas do |k,v| %>
13
+ <%= k %>: <%= v %>
14
+ <% end %>
15
+ )
16
+ <% end %>
17
+ </ul>
18
+ <% else %>
19
+ <h2>No rallies for yet this goal.</h2>
20
+ <% end %>
21
+ </div>
22
+ </div>
@@ -9,7 +9,7 @@
9
9
  <% @rallies.each do |rally| %>
10
10
  <li><%= rally.convert.name %> at <%= rally.created_at.to_s %></li>
11
11
  (
12
- <% rally.all_metas do |k,v| %>
12
+ <% rally.all_metas.each do |k,v| %>
13
13
  <%= k %>: <%= v %>
14
14
  <% end %>
15
15
  )
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: 1
4
+ hash: 63
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 15
10
- version: 0.0.15
9
+ - 16
10
+ version: 0.0.16
11
11
  platform: ruby
12
12
  authors:
13
13
  - Geoffrey Hayes
@@ -96,17 +96,8 @@ files:
96
96
  - lib/mountain-goat/public/raster.png
97
97
  - lib/mountain-goat/switch_variant.rb
98
98
  - lib/mountain-goat/version.rb
99
- - lib/mountain-goat/views/mountain_goat/layouts/.tmp_mountain_goat.html.erb.27527~
100
- - lib/mountain-goat/views/mountain_goat/layouts/.tmp_mountain_goat.html.erb.92713~
101
99
  - lib/mountain-goat/views/mountain_goat/layouts/mountain_goat.html.erb
102
- - lib/mountain-goat/views/mountain_goat/mountain_goat/.tmp_login.html.erb.27219~
103
100
  - lib/mountain-goat/views/mountain_goat/mountain_goat/login.html.erb
104
- - lib/mountain-goat/views/mountain_goat/mountain_goat_converts/.tmp_index.html.erb.19748~
105
- - lib/mountain-goat/views/mountain_goat/mountain_goat_converts/.tmp_index.html.erb.22467~
106
- - lib/mountain-goat/views/mountain_goat/mountain_goat_converts/.tmp_index.html.erb.64368~
107
- - lib/mountain-goat/views/mountain_goat/mountain_goat_converts/.tmp_new.html.erb.92177~
108
- - lib/mountain-goat/views/mountain_goat/mountain_goat_converts/.tmp_show.html.erb.17936~
109
- - lib/mountain-goat/views/mountain_goat/mountain_goat_converts/.tmp_show.html.erb.66078~
110
101
  - lib/mountain-goat/views/mountain_goat/mountain_goat_converts/_convert_form.html.erb
111
102
  - lib/mountain-goat/views/mountain_goat/mountain_goat_converts/_convert_meta_type_form.html.erb
112
103
  - lib/mountain-goat/views/mountain_goat/mountain_goat_converts/edit.html.erb
@@ -118,13 +109,12 @@ files:
118
109
  - lib/mountain-goat/views/mountain_goat/mountain_goat_metric_variants/index.html.erb
119
110
  - lib/mountain-goat/views/mountain_goat/mountain_goat_metric_variants/new.html.erb
120
111
  - lib/mountain-goat/views/mountain_goat/mountain_goat_metric_variants/show.html.erb
121
- - lib/mountain-goat/views/mountain_goat/mountain_goat_metrics/.tmp_index.html.erb.48226~
122
112
  - lib/mountain-goat/views/mountain_goat/mountain_goat_metrics/_metric_form.html.erb
123
113
  - lib/mountain-goat/views/mountain_goat/mountain_goat_metrics/edit.html.erb
124
114
  - lib/mountain-goat/views/mountain_goat/mountain_goat_metrics/index.html.erb
125
115
  - lib/mountain-goat/views/mountain_goat/mountain_goat_metrics/new.html.erb
126
116
  - lib/mountain-goat/views/mountain_goat/mountain_goat_metrics/show.html.erb
127
- - lib/mountain-goat/views/mountain_goat/mountain_goat_rallies/.tmp_index.html.erb.56746~
117
+ - lib/mountain-goat/views/mountain_goat/mountain_goat_rallies/.tmp_index.html.erb.12762~
128
118
  - lib/mountain-goat/views/mountain_goat/mountain_goat_rallies/index.html.erb
129
119
  - migrations/20090716093747_create_metric_tracking_tables.rb
130
120
  - migrations/20110710193220_mountain_goat_add_mg_options_table.rb
@@ -1,51 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
-
3
- <% is_mobile = false if local_assigns[:is_mobile].nil? %>
4
-
5
- <html xmlns="http://www.w3.org/1999/xhtml">
6
-
7
- <head>
8
- <title>Mountain Goat <% if @title %> - <%=h @title %><% end %></title>
9
-
10
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
11
-
12
- <%# These are mobile specific settings. We are disabling zooming and fixing the width. %>
13
- <meta content='True' name='HandheldFriendly' />
14
- <!--<meta content='width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;' name='viewport' />-->
15
- <meta name="viewport" content="width=device-width" />
16
-
17
- <link rel="stylesheet" href="/mg/public/mg_css" type="text/css" />
18
-
19
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script>
20
- <script src="/mg/public/jquery_flot_js" type="text/javascript"></script>
21
- <script src="/mg/public/mg_js" type="text/javascript"></script>
22
-
23
- </head>
24
-
25
- <body>
26
-
27
- <div class="header">
28
- <div class="head">
29
- <a href="/mg" class="logo">
30
- <img src="/mg/public/mg_png" />
31
- </a>
32
- <ul class="nav">
33
- <li><a href="<%= mountain_goat_converts_url %>">Goals</a></li>
34
- <li><a href="<%= mountain_goat_metrics_url %>">Metrics</a></li>
35
- </ul>
36
- </div>
37
- </div>
38
-
39
- <div class="content">
40
- <div class="content-inner">
41
- <%= yield %>
42
- </div>
43
- </div>
44
-
45
- <div id="container-footer">
46
-
47
- </div>
48
- </div>
49
- </body>
50
-
51
- </html>
@@ -1,62 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
-
3
- <% is_mobile = false if local_assigns[:is_mobile].nil? %>
4
-
5
- <html xmlns="http://www.w3.org/1999/xhtml">
6
-
7
- <head>
8
- <title>Mountain Goat <% if @title %> - <%=h @title %><% end %></title>
9
-
10
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
11
-
12
- <%# These are mobile specific settings. We are disabling zooming and fixing the width. %>
13
- <meta content='True' name='HandheldFriendly' />
14
- <!--<meta content='width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;' name='viewport' />-->
15
- <meta name="viewport" content="width=device-width" />
16
-
17
- <link rel="stylesheet" href="/mg/public/mg_css" type="text/css" />
18
-
19
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script>
20
- <script src="/mg/public/jquery_flot_js" type="text/javascript"></script>
21
- <script src="/mg/public/mg_js" type="text/javascript"></script>
22
-
23
- </head>
24
-
25
- <body>
26
-
27
- <div class="header">
28
- <div class="head">
29
- <a href="/mg" class="logo">
30
- <img src="/mg/public/mg_png" />
31
- </a>
32
- <ul class="nav">
33
- <li><a href="<%= mountain_goat_converts_url %>">Goals</a></li>
34
- <li><a href="<%= mountain_goat_metrics_url %>">Metrics</a></li>
35
- <li><a href="/">Exit</a></li>
36
- </ul>
37
- </div>
38
- </div>
39
-
40
- <div class="content">
41
- <div class="content-inner">
42
- <% if !flash[:notice].blank? || !flash[:error].blank? %>
43
- <div class="flash">
44
- <% if !flash[:error].blank? %>
45
- <div class="error"><%= flash[:error] %></div>
46
- <% end %>
47
- <% if !flash[:notice].blank? %>
48
- <div class="notice"><%= flash[:notice] %></div>
49
- <% end %>
50
- </div>
51
- <% end %>
52
- <%= yield %>
53
- </div>
54
- </div>
55
-
56
- <div id="container-footer">
57
-
58
- </div>
59
- </div>
60
- </body>
61
-
62
- </html>
@@ -1,9 +0,0 @@
1
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2
- <html>
3
- <head>
4
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
5
- <title>Untitled Document</title>
6
- </head>
7
- <body>
8
- </body>
9
- </html>
@@ -1,49 +0,0 @@
1
-
2
-
3
- <div id="container-main" class="mt-converts">
4
- <div class="mountain-goat-panel centered">
5
-
6
- <h1>Conversion Goals</h1>
7
-
8
- <div class="conversions">
9
- <div class="explanation">
10
- <span class="inner">
11
- Below are a list of conversion goals. Each goal has a set of metrics designed to achieve that goal. For each metric, there is a list of variants, each coupled with its conversation rate.</span>
12
- </span>
13
- </div>
14
-
15
- <div class="converts">
16
- <% @converts.each do |convert| %>
17
- <h2><a href="<%= mountain_goat_convert_url :id => convert.id %>"><%=h convert.name %></a></h2>
18
- <% convert.metrics.each do |metric| %>
19
- <div class="metric-category">
20
- <span class="metric"><a href="<%= mountain_goat_metric_url :id => metric.id %>"><%= metric.title %></a></span>
21
- <% if metric.metric_variants.count == 0 %>
22
- <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>
23
- <% else %>
24
- <% metric.metric_variants.each do |mv| %>
25
- <div class="item rate">
26
- <span class="rate-holder">
27
- <span class="title"><a href="<%= mountain_goat_metric_variant_url mv %>"><%=h mv.name %></a></span>
28
- <span class="rates" style="width:<%= number_to_percentage(mv.conversion_rate, :precision => 0) %>"></span>
29
- </span>
30
-
31
- <span class="percent-holder">
32
- <span class="val"><%= number_to_percentage(mv.conversion_rate, :precision => 0) %></span>
33
- (<span class="conversions"><%= mv.conversions %></span> /
34
- <span class="served"><%= mv.served %></span>)
35
- </span>
36
- </div>
37
- <% end %>
38
- <% end %>
39
- </div>
40
- <% end %>
41
- <% end %>
42
- </div>
43
- </div>
44
-
45
- <div class="actions">
46
- <a class="button" href="<%= new_mountain_goat_convert_url %>">New Goal</a>
47
- </div>
48
- </div>
49
- </div>
@@ -1,49 +0,0 @@
1
-
2
-
3
- <div id="container-main" class="mt-converts">
4
- <div class="mountain-goat-panel centered">
5
-
6
- <h1>Conversion Goals</h1>
7
-
8
- <div class="conversions">
9
- <div class="explanation">
10
- <span class="inner">
11
- Below are a list of conversion goals. Each goal has a set of metrics designed to achieve that goal. For each metric, there is a list of variants, each coupled with its conversation rate.</span>
12
- </span>
13
- </div>
14
-
15
- <div class="converts">
16
- <% @converts.each do |convert| %>
17
- <h2><a href="<%= mountain_goat_convert_url :id => convert.id %>"><%=h convert.name %></a></h2>
18
- <% convert.metrics.each do |metric| %>
19
- <div class="metric-category">
20
- <span class="metric"><a href="<%= mountain_goat_metric_url :id => metric.id %>"><%= metric.title %></a></span>
21
- <% if metric.metric_variants.count == 0 %>
22
- <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>
23
- <% else %>
24
- <% metric.metric_variants.each do |mv| %>
25
- <div class="item rate">
26
- <span class="rate-holder">
27
- <span class="title"><a href="<%= mountain_goat_metric_variant_url mv %>"><%=h mv.name %></a></span>
28
- <span class="rates" style="width:<%= number_to_percentage(mv.conversion_rate, :precision => 0) %>"></span>
29
- </span>
30
-
31
- <span class="percent-holder">
32
- <span class="val"><%= number_to_percentage(mv.conversion_rate, :precision => 0) %></span>
33
- (<span class="conversions"><%= mv.conversions %></span> /
34
- <span class="served"><%= mv.served %></span>)
35
- </span>
36
- </div>
37
- <% end %>
38
- <% end %>
39
- </div>
40
- <% end %>
41
- <% end %>
42
- </div>
43
- </div>
44
-
45
- <div class="actions">
46
- <a class="button" href="<%= new_mountain_goat_convert_url %>">New Goal</a>
47
- </div>
48
- </div>
49
- </div>
@@ -1,49 +0,0 @@
1
-
2
-
3
- <div id="container-main" class="mt-converts">
4
- <div class="mountain-goat-panel centered">
5
-
6
- <h1>Conversion Goals</h1>
7
-
8
- <div class="conversions">
9
- <div class="explanation">
10
- <span class="inner">
11
- Below are a list of conversion goals. Each goal has a set of metrics designed to achieve that goal. For each metric, there is a list of variants, each coupled with its conversation rate.</span>
12
- </span>
13
- </div>
14
-
15
- <div class="converts">
16
- <% @converts.each do |convert| %>
17
- <h2><a href="<%= mountain_goat_convert_url :id => convert.id %>"><%=h convert.name %></a></h2>
18
- <% convert.metrics.each do |metric| %>
19
- <div class="metric-category">
20
- <span class="metric"><a href="<%= mountain_goat_metric_url :id => metric.id %>"><%= metric.title %></a></span>
21
- <% if metric.metric_variants.count == 0 %>
22
- <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>
23
- <% else %>
24
- <% metric.metric_variants.each do |mv| %>
25
- <div class="item rate">
26
- <span class="rate-holder">
27
- <span class="title"><a href="<%= mountain_goat_metric_variant_url mv %>"><%=h mv.name %></a></span>
28
- <span class="rates" style="width:<%= number_to_percentage(mv.conversion_rate, :precision => 0) %>"></span>
29
- </span>
30
-
31
- <span class="percent-holder">
32
- <span class="val"><%= number_to_percentage(mv.conversion_rate, :precision => 0) %></span>
33
- (<span class="conversions"><%= mv.conversions %></span> /
34
- <span class="served"><%= mv.served %></span>)
35
- </span>
36
- </div>
37
- <% end %>
38
- <% end %>
39
- </div>
40
- <% end %>
41
- <% end %>
42
- </div>
43
- </div>
44
-
45
- <div class="actions">
46
- <a class="button" href="<%= new_mountain_goat_convert_url %>">New Goal</a>
47
- </div>
48
- </div>
49
- </div>
@@ -1,13 +0,0 @@
1
-
2
-
3
- <div id="container-main" class="mt-converts">
4
- <div class="mountain-goat-panel centered">
5
- <h2>New convert</h2>
6
-
7
- <% form_for :convert, @convert, :url => mountain_goat_converts_url do |f| %>
8
- <%= f.error_messages %>
9
-
10
- <%= render :partial => 'mountain_goat_converts/convert_form', :locals => { :f => f } %>
11
- <% end %>
12
- </div>
13
- </div>
@@ -1,73 +0,0 @@
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-converts show">
7
- <div class="mountain-goat-panel centered">
8
- <ul class="nav">
9
- <li><a href="<%= mountain_goat_converts_url %>">Goals</a></li>
10
- <li><a href="<%= mountain_goat_convert_url @convert.id %>"><%=h @convert.name %> Goal</a></li>
11
- </ul>
12
-
13
- <h1><%=h @convert.name %></h1>
14
-
15
- <div class="statpads">
16
- <div class="flyer-analysis statpad">
17
- <div class="title">Conversions by Day</div>
18
- <div class="statbody">
19
- <%= chart("analysis_graph#{@convert.id}",
20
- { "Conversions" => { :collection => @results_per_day, :x => :date, :y => :val } },
21
- { :xaxis => {:mode => 'time', :timeformat => "%b %d" }, :yaxis => { :min => 0, :minTickSize => 1 }, :lines => { :show => true }, :legend => { :position => "ne" }, :grid => { :hoverable => true, :clickable => true }, :inline => false }, :placeholder_size => "420x260", :pie_hover => true, :line_hover_absolute => true, :item_title => "view(s)") %>
22
- </div>
23
- </div>
24
-
25
- <% @convert.convert_meta_types.each do |cmt| %>
26
- <div class="flyer-analysis statpad">
27
- <div class="title">Conversions by <%=h cmt.name %></div>
28
- <div class="statbody">
29
- <% if cmt.meta_type == 'ci_meta' %>
30
- <%= chart("analysis_graph#{cmt.id}",
31
- { "Conversions" => { :collection => @results_by_cmt[cmt.id], :x => :name, :y => :val } },
32
- { :xaxis => {:autoscaleMargin => 1, :minTickSize => 1 }, :yaxis => { :min => 0, :minTickSize => 1 }, :bars => { :show => true, :align => 'center', :barWidth => 1 }, :legend => { :position => "ne" }, :grid => { :hoverable => true, :clickable => true }, :inline => false }, :placeholder_size => "420x260", :pie_hover => true, :line_hover_absolute => true, :item_title => "view(s)") %>
33
- <% elsif cmt.meta_type == 'cs_meta' %>
34
- <%= chart("analysis_graph#{cmt.id}",
35
- { "Conversions" => { :collection => @results_by_cmt[cmt.id], :x => :name, :y => :val } },
36
- { :xaxis => {:autoscaleMargin => 0.1, :ticks => @results_by_cmt_titles[cmt.id].map { |i,t| [i + 0.5, t] }.sort }, :yaxis => { :min => 0, :minTickSize => 1 }, :bars => { :show => true }, :legend => { :position => "ne" }, :grid => { :hoverable => true, :clickable => true }, :inline => false }, :placeholder_size => "420x260", :pie_hover => true, :line_hover_absolute => true, :item_title => "view(s)") %>
37
- <% end %>
38
- </div>
39
- </div>
40
- <% end %>
41
- </div>
42
-
43
- <% @convert.metrics.each do |metric| %>
44
- <div class="metric-category">
45
- <span class="metric"><a href="<%= mountain_goat_metric_url :id => metric.id %>"><%= metric.title %></a></span>
46
- <% if metric.metric_variants.count == 0 %>
47
- <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>
48
- <% else %>
49
- <% metric.metric_variants.each do |mv| %>
50
- <div class="item rate">
51
- <span class="rate-holder">
52
- <span class="title"><a href="<%= mountain_goat_metric_variant_url mv %>"><%=h mv.name %></a></span>
53
- <span class="rates" style="width:<%= number_to_percentage(mv.conversion_rate, :precision => 0) %>"></span>
54
- </span>
55
-
56
- <span class="percent-holder">
57
- <span class="val"><%= number_to_percentage(mv.conversion_rate, :precision => 0) %></span>
58
- (<span class="conversions"><%= mv.conversions %></span> /
59
- <span class="served"><%= mv.served %></span>)
60
- </span>
61
- </div>
62
- <% end %>
63
- <% end %>
64
- </div>
65
- <% end %>
66
-
67
- <div class="actions">
68
- <a class="button" href="<%= edit_mountain_goat_convert_url :id => @convert.id %>">Edit</a>
69
- <a class="button" href="<%= new_mountain_goat_convert_mountain_goat_metric_url :mountain_goat_convert_id => @convert.id %>">New Metric</a>
70
- </div>
71
-
72
- </div>
73
- </div>
@@ -1,73 +0,0 @@
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-converts show">
7
- <div class="mountain-goat-panel centered">
8
- <ul class="nav">
9
- <li><a href="<%= mountain_goat_converts_url %>">Goals</a></li>
10
- <li><a href="<%= mountain_goat_convert_url @convert.id %>"><%=h @convert.name %> Goal</a></li>
11
- </ul>
12
-
13
- <h1><%=h @convert.name %></h1>
14
-
15
- <div class="statpads">
16
- <div class="flyer-analysis statpad">
17
- <div class="title">Conversions by Day</div>
18
- <div class="statbody">
19
- <%= chart("analysis_graph#{@convert.id}",
20
- { "Conversions" => { :collection => @results_per_day, :x => :date, :y => :val } },
21
- { :xaxis => {:mode => 'time', :timeformat => "%b %d" }, :yaxis => { :min => 0, :minTickSize => 1 }, :lines => { :show => true }, :legend => { :position => "ne" }, :grid => { :hoverable => true, :clickable => true }, :inline => false }, :placeholder_size => "420x260", :pie_hover => true, :line_hover_absolute => true, :item_title => "view(s)") %>
22
- </div>
23
- </div>
24
-
25
- <% @convert.convert_meta_types.each do |cmt| %>
26
- <div class="flyer-analysis statpad">
27
- <div class="title">Conversions by <%=h cmt.name %></div>
28
- <div class="statbody">
29
- <% if cmt.meta_type == 'ci_meta' %>
30
- <%= chart("analysis_graph#{cmt.id}",
31
- { "Conversions" => { :collection => @results_by_cmt[cmt.id], :x => :name, :y => :val } },
32
- { :xaxis => {:autoscaleMargin => 1, :minTickSize => 1 }, :yaxis => { :min => 0, :minTickSize => 1 }, :bars => { :show => true, :align => 'center', :barWidth => 1 }, :legend => { :position => "ne" }, :grid => { :hoverable => true, :clickable => true }, :inline => false }, :placeholder_size => "420x260", :pie_hover => true, :line_hover_absolute => true, :item_title => "view(s)") %>
33
- <% elsif cmt.meta_type == 'cs_meta' %>
34
- <%= chart("analysis_graph#{cmt.id}",
35
- { "Conversions" => { :collection => @results_by_cmt[cmt.id], :x => :name, :y => :val } },
36
- { :xaxis => {:autoscaleMargin => 0.1, :ticks => @results_by_cmt_titles[cmt.id].map { |i,t| [i + 0.5, t] }.sort }, :yaxis => { :min => 0, :minTickSize => 1 }, :bars => { :show => true }, :legend => { :position => "ne" }, :grid => { :hoverable => true, :clickable => true }, :inline => false }, :placeholder_size => "420x260", :pie_hover => true, :line_hover_absolute => true, :item_title => "view(s)") %>
37
- <% end %>
38
- </div>
39
- </div>
40
- <% end %>
41
- </div>
42
-
43
- <% @convert.metrics.each do |metric| %>
44
- <div class="metric-category">
45
- <span class="metric"><a href="<%= mountain_goat_metric_url :id => metric.id %>"><%= metric.title %></a></span>
46
- <% if metric.metric_variants.count == 0 %>
47
- <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>
48
- <% else %>
49
- <% metric.metric_variants.each do |mv| %>
50
- <div class="item rate">
51
- <span class="rate-holder">
52
- <span class="title"><a href="<%= mountain_goat_metric_variant_url mv %>"><%=h mv.name %></a></span>
53
- <span class="rates" style="width:<%= number_to_percentage(mv.conversion_rate, :precision => 0) %>"></span>
54
- </span>
55
-
56
- <span class="percent-holder">
57
- <span class="val"><%= number_to_percentage(mv.conversion_rate, :precision => 0) %></span>
58
- (<span class="conversions"><%= mv.conversions %></span> /
59
- <span class="served"><%= mv.served %></span>)
60
- </span>
61
- </div>
62
- <% end %>
63
- <% end %>
64
- </div>
65
- <% end %>
66
-
67
- <div class="actions">
68
- <a class="button" href="<%= edit_mountain_goat_convert_url :id => @convert.id %>">Edit</a>
69
- <a class="button" href="<%= new_mountain_goat_convert_mountain_goat_metric_url :mountain_goat_convert_id => @convert.id %>">New Metric</a>
70
- </div>
71
-
72
- </div>
73
- </div>
@@ -1,15 +0,0 @@
1
-
2
-
3
- <div id="container-main" class="mt-metrics">
4
- <div class="mountain-goat-panel">
5
- <h1>All metrics</h1>
6
-
7
- <% @metrics.each do |metric| %>
8
- <h2><a href="<%= mountain_goat_metric_url metric %>"><%=h metric.title %> </a> for <%=h metric.convert.name %></h2>
9
- <% end %>
10
-
11
- <span class="actions">
12
- <a class="button" href="<%= new_mountain_goat_metric_url %>">New metric</a>
13
- </span>
14
- </div>
15
- </div>
@@ -1,9 +0,0 @@
1
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2
- <html>
3
- <head>
4
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
5
- <title>Untitled Document</title>
6
- </head>
7
- <body>
8
- </body>
9
- </html>