mitamirri 0.13.8 → 2.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (236) hide show
  1. data/Capfile +4 -0
  2. data/Gemfile +29 -0
  3. data/README.rdoc +6 -55
  4. data/Rakefile +34 -21
  5. data/VERSION +1 -1
  6. data/app/controllers/admin/tracking/reports_controller.rb +78 -0
  7. data/app/controllers/admin/tracking/trackable_sessions_controller.rb +7 -0
  8. data/app/controllers/application_controller.rb +1 -8
  9. data/app/controllers/trackable_actions_controller.rb +0 -2
  10. data/app/helpers/application_helper.rb +21 -0
  11. data/app/helpers/layout_helper.rb +18 -0
  12. data/app/models/content_report.rb +35 -0
  13. data/app/models/content_stat.rb +4 -0
  14. data/app/models/destination.rb +4 -0
  15. data/app/models/intersite_traffic_report.rb +47 -0
  16. data/app/models/keyword_stat.rb +4 -0
  17. data/app/models/lead.rb +3 -0
  18. data/app/models/lead_stat.rb +5 -0
  19. data/app/models/leads_report.rb +32 -0
  20. data/app/models/location_stat.rb +37 -0
  21. data/app/models/referrer_stat.rb +4 -0
  22. data/app/models/report.rb +83 -0
  23. data/app/models/stat_base.rb +11 -0
  24. data/app/models/trackable_action.rb +114 -91
  25. data/app/models/trackable_base.rb +12 -0
  26. data/app/models/trackable_location.rb +7 -13
  27. data/app/models/trackable_session.rb +255 -171
  28. data/app/models/trackable_stat.rb +45 -27
  29. data/app/models/traffic_explorer_report.rb +92 -0
  30. data/app/models/traffic_summary_report.rb +142 -0
  31. data/app/models/user_agent_stat.rb +4 -0
  32. data/app/models/visit.rb +6 -0
  33. data/app/models/visit_stat.rb +5 -0
  34. data/app/models/visitor.rb +4 -0
  35. data/app/models/visitor_profile_report.rb +23 -0
  36. data/app/views/admin/tracking/reports/_content.html.erb +28 -0
  37. data/app/views/admin/tracking/reports/_conversion_rate.html.erb +30 -0
  38. data/app/views/admin/tracking/reports/_criteria.html.erb +33 -0
  39. data/app/views/admin/tracking/reports/_entrance_pages.html.erb +29 -0
  40. data/app/views/admin/tracking/reports/_exit_pages.html.erb +28 -0
  41. data/app/views/admin/tracking/reports/_explorer_criteria.html.erb +22 -0
  42. data/app/views/admin/tracking/reports/_explorer_summary.html.erb +22 -0
  43. data/app/views/admin/tracking/reports/_intersite_destinations.html.erb +28 -0
  44. data/app/views/admin/tracking/reports/_intersite_referrals.html.erb +30 -0
  45. data/app/views/admin/tracking/reports/_leads.html.erb +30 -0
  46. data/app/views/admin/tracking/reports/_locations.html.erb +47 -0
  47. data/app/views/admin/tracking/reports/_recent_visits.html.erb +33 -0
  48. data/app/views/admin/tracking/reports/_referring_keywords.html.erb +28 -0
  49. data/app/views/admin/tracking/reports/_referring_sites.html.erb +28 -0
  50. data/app/views/admin/tracking/reports/_traffic_summary.html.erb +26 -0
  51. data/app/views/admin/tracking/reports/_user_agents.html.erb +28 -0
  52. data/app/views/{trackable_sessions/_visits_graph.html.erb → admin/tracking/reports/_visits_by_kind.html.erb} +3 -3
  53. data/app/views/admin/tracking/reports/content.html.erb +12 -0
  54. data/app/views/admin/tracking/reports/explorer.html.erb +13 -0
  55. data/app/views/admin/tracking/reports/index.html.erb +16 -0
  56. data/app/views/admin/tracking/reports/intersite.html.erb +11 -0
  57. data/app/views/admin/tracking/reports/leads.html.erb +11 -0
  58. data/app/views/admin/tracking/reports/summary.html.erb +16 -0
  59. data/app/views/admin/tracking/reports/visitor_profile.html.erb +11 -0
  60. data/app/views/{trackable_sessions → admin/tracking/trackable_sessions}/show.html.erb +5 -4
  61. data/app/views/layouts/application.html.erb +51 -18
  62. data/config.ru +4 -0
  63. data/config/application.rb +13 -0
  64. data/config/boot.rb +13 -110
  65. data/config/cucumber.yml +10 -0
  66. data/config/deploy.rb +40 -0
  67. data/config/environment.rb +4 -23
  68. data/config/environments/development.rb +24 -13
  69. data/config/environments/production.rb +41 -20
  70. data/config/environments/test.rb +28 -24
  71. data/config/initializers/formats.rb +19 -0
  72. data/config/initializers/metric_fu.rb +9 -0
  73. data/config/initializers/secret_token.rb +7 -0
  74. data/config/initializers/session_store.rb +3 -10
  75. data/config/locales/en.yml +1 -1
  76. data/config/mongoid.yml +19 -0
  77. data/config/routes.rb +16 -10
  78. data/features/access_reports.feature +26 -0
  79. data/features/step_definitions/reports_steps.rb +9 -0
  80. data/features/step_definitions/web_steps.rb +219 -0
  81. data/features/support/env.rb +32 -0
  82. data/features/support/hooks.rb +1 -0
  83. data/features/support/paths.rb +33 -0
  84. data/features/traffic_summary_report.feature +43 -0
  85. data/init.rb +0 -7
  86. data/lib/mitamirri.rb +9 -12
  87. data/lib/mitamirri/engine.rb +7 -0
  88. data/lib/mitamirri/helper.rb +13 -29
  89. data/lib/mitamirri/railtie.rb +10 -0
  90. data/lib/tasks/cucumber.rake +60 -0
  91. data/lib/tasks/rcov.rake +44 -0
  92. data/mitamirri.gemspec +228 -100
  93. data/public/404.html +26 -0
  94. data/public/422.html +26 -0
  95. data/public/500.html +26 -0
  96. data/{config/database.yml → public/favicon.ico} +0 -0
  97. data/public/images/icons/add.png +0 -0
  98. data/public/images/icons/collapsed.gif +0 -0
  99. data/public/images/icons/delete.png +0 -0
  100. data/public/images/icons/drag.png +0 -0
  101. data/public/images/icons/edit.png +0 -0
  102. data/public/images/icons/expanded.gif +0 -0
  103. data/public/images/icons/help_icon.png +0 -0
  104. data/public/images/icons/link_icon.png +0 -0
  105. data/public/images/icons/move.png +0 -0
  106. data/public/images/icons/move_white.png +0 -0
  107. data/public/images/icons/note.png +0 -0
  108. data/public/images/icons/note_white.png +0 -0
  109. data/public/images/icons/notification_icon_sprite.png +0 -0
  110. data/public/images/icons/spinner.gif +0 -0
  111. data/public/images/icons/view.png +0 -0
  112. data/public/images/icons/warning.png +0 -0
  113. data/public/images/icons/warning_2.png +0 -0
  114. data/public/images/icons/warning_box.png +0 -0
  115. data/public/images/icons/warning_icon.png +0 -0
  116. data/public/images/icons/warning_white.png +0 -0
  117. data/public/images/layout/arrow_asc.png +0 -0
  118. data/public/images/layout/arrow_desc.png +0 -0
  119. data/public/images/layout/back.png +0 -0
  120. data/public/images/layout/black_bar.png +0 -0
  121. data/public/images/layout/branding.png +0 -0
  122. data/public/images/layout/breadcrumb_bg.png +0 -0
  123. data/public/images/layout/button_bg.png +0 -0
  124. data/public/images/layout/content_left_bg.png +0 -0
  125. data/public/images/layout/content_right_bg.png +0 -0
  126. data/public/images/layout/footer_bg.png +0 -0
  127. data/public/images/layout/h1_bg.png +0 -0
  128. data/public/images/layout/h2_bg.png +0 -0
  129. data/public/images/layout/h2_bg_for_table.png +0 -0
  130. data/public/images/layout/header_bg_grey.png +0 -0
  131. data/public/images/layout/header_bg_purple.png +0 -0
  132. data/public/images/layout/legend_bg.png +0 -0
  133. data/public/images/layout/menu_box_bg.png +0 -0
  134. data/public/images/layout/shadow_border.png +0 -0
  135. data/public/images/layout/shadow_border_2.png +0 -0
  136. data/public/images/layout/shadow_border_3.png +0 -0
  137. data/public/images/layout/shadow_border_4.png +0 -0
  138. data/public/images/layout/tab.png +0 -0
  139. data/public/images/layout/tab_active.png +0 -0
  140. data/public/images/layout/table_header.png +0 -0
  141. data/public/images/layout/text_field_bg.jpg +0 -0
  142. data/public/images/layout/text_field_error_bg.png +0 -0
  143. data/public/images/layout/th_bg.png +0 -0
  144. data/public/images/layout/th_bg_selected.png +0 -0
  145. data/public/images/menu_icons/content_report.png +0 -0
  146. data/public/images/menu_icons/content_report_on.png +0 -0
  147. data/public/images/menu_icons/funnel.png +0 -0
  148. data/public/images/menu_icons/funnel_on.png +0 -0
  149. data/public/images/menu_icons/intersite_traffic.png +0 -0
  150. data/public/images/menu_icons/intersite_traffic_on.png +0 -0
  151. data/public/images/menu_icons/leads.png +0 -0
  152. data/public/images/menu_icons/leads_on.png +0 -0
  153. data/public/images/menu_icons/traffic_explorer.png +0 -0
  154. data/public/images/menu_icons/traffic_explorer_on.png +0 -0
  155. data/public/images/menu_icons/traffic_summary.png +0 -0
  156. data/public/images/menu_icons/traffic_summary_on.png +0 -0
  157. data/public/images/menu_icons/visitor_profile.png +0 -0
  158. data/public/images/menu_icons/visitor_profile_on.png +0 -0
  159. data/public/index.html +8 -0
  160. data/public/javascripts/application.js +2 -0
  161. data/public/javascripts/controls.js +965 -0
  162. data/public/javascripts/dragdrop.js +974 -0
  163. data/public/javascripts/effects.js +1123 -0
  164. data/public/javascripts/prototype.js +6001 -0
  165. data/public/javascripts/rails.js +175 -0
  166. data/public/robots.txt +5 -0
  167. data/public/stylesheets/.gitkeep +0 -0
  168. data/public/stylesheets/application.css +876 -0
  169. data/public/stylesheets/core.css +1146 -0
  170. data/public/stylesheets/core_ie.css +52 -0
  171. data/public/stylesheets/csshover3.htc +14 -0
  172. data/public/stylesheets/mitamirri.css +37 -724
  173. data/public/stylesheets/mitamirri_print.css +3 -0
  174. data/script/cucumber +10 -0
  175. data/script/rails +6 -0
  176. data/spec/blueprints.rb +13 -0
  177. data/spec/helpers/application_helper_spec.rb +23 -35
  178. data/spec/{lib → models}/content_report_spec.rb +12 -8
  179. data/spec/{lib → models}/intersite_traffic_report_spec.rb +6 -9
  180. data/spec/{lib → models}/leads_report_spec.rb +11 -12
  181. data/spec/models/location_stat_spec.rb +18 -0
  182. data/spec/models/trackable_action_spec.rb +46 -14
  183. data/spec/models/trackable_base_spec.rb +27 -0
  184. data/spec/models/trackable_session_spec.rb +181 -57
  185. data/spec/{lib/session_report_spec.rb → models/traffic_explorer_report_spec.rb} +8 -25
  186. data/spec/spec_helper.rb +8 -28
  187. data/{lib/mitamirri/tasks.rb → tasks/mitamirri.rake} +6 -7
  188. data/vendor/plugins/.gitkeep +0 -0
  189. metadata +316 -77
  190. data/.gitignore +0 -26
  191. data/app/controllers/trackable_sessions_controller.rb +0 -100
  192. data/app/views/trackable_sessions/_keywords_graph.html.erb +0 -24
  193. data/app/views/trackable_sessions/_print_buttons.html.erb +0 -3
  194. data/app/views/trackable_sessions/_sessions.html.erb +0 -26
  195. data/app/views/trackable_sessions/_top_referrers.html.erb +0 -24
  196. data/app/views/trackable_sessions/_traffic_summary_all.html.erb +0 -64
  197. data/app/views/trackable_sessions/_traffic_summary_by_kind.html.erb +0 -48
  198. data/app/views/trackable_sessions/content.html.erb +0 -119
  199. data/app/views/trackable_sessions/explorer.html.erb +0 -67
  200. data/app/views/trackable_sessions/export.xls.erb +0 -5
  201. data/app/views/trackable_sessions/index.html.erb +0 -47
  202. data/app/views/trackable_sessions/intersite.html.erb +0 -97
  203. data/app/views/trackable_sessions/leads.html.erb +0 -98
  204. data/app/views/trackable_sessions/visitor_profile.html.erb +0 -114
  205. data/config/initializers/backtrace_silencers.rb +0 -7
  206. data/config/initializers/database.rb +0 -1
  207. data/config/initializers/inflections.rb +0 -10
  208. data/config/initializers/mime_types.rb +0 -5
  209. data/config/initializers/new_rails_defaults.rb +0 -21
  210. data/db/development.sqlite3 +0 -0
  211. data/db/migrate/20100810173533_create_trackable_sessions.rb +0 -23
  212. data/db/migrate/20100810173605_create_trackable_actions.rb +0 -20
  213. data/db/test.sqlite3 +0 -1
  214. data/lib/mitamirri/content_report.rb +0 -75
  215. data/lib/mitamirri/intersite_traffic_report.rb +0 -122
  216. data/lib/mitamirri/leads_report.rb +0 -90
  217. data/lib/mitamirri/session_report.rb +0 -219
  218. data/lib/mitamirri/stat_report.rb +0 -216
  219. data/lib/mitamirri/visitor_profile_report.rb +0 -127
  220. data/script/about +0 -4
  221. data/script/console +0 -3
  222. data/script/dbconsole +0 -3
  223. data/script/destroy +0 -3
  224. data/script/generate +0 -3
  225. data/script/performance/benchmarker +0 -3
  226. data/script/performance/profiler +0 -3
  227. data/script/plugin +0 -3
  228. data/script/runner +0 -3
  229. data/script/server +0 -3
  230. data/spec/controllers/trackable_actions_controller_spec.rb +0 -5
  231. data/spec/controllers/trackable_sessions_controller_spec.rb +0 -5
  232. data/spec/custom_matchers.rb +0 -23
  233. data/spec/lib/stat_report_spec.rb +0 -106
  234. data/spec/rcov.opts +0 -4
  235. data/spec/schema.rb +0 -34
  236. data/spec/spec.opts +0 -4
@@ -0,0 +1,29 @@
1
+ <div class="form_container">
2
+ <%= legend_tag "Entrance Pages", :help => 'This chart shows the top 25 pages that users initially visited across the selected site(s). Click on any bar in the graph for a count of visits to the corresponding page.' -%>
3
+ <br />
4
+
5
+ <%- if @entrance_pages_series.empty? -%>
6
+ <p><em>No data matched your criteria.</em></p>
7
+ <%- else -%>
8
+ <div id="entrance_pages_chart" class="chart" style="width: 100%; border: 1px solid #999999; background-color: #ffffff; text-align: center;"></div>
9
+
10
+ <%= Seer::visualize(
11
+ @entrance_pages_series,
12
+ :as => :bar_chart,
13
+ :in_element => 'entrance_pages_chart',
14
+ :series => {:series_label => 'url', :data_method => 'views'},
15
+ :chart_options => {
16
+ :height => @entrance_pages_series.size * 20,
17
+ :width => 900,
18
+ :is_3_d => false,
19
+ :legend => 'none',
20
+ :colors => ["#7e7587"],
21
+ :title => "# of Page Views",
22
+ :title_font_size => 9,
23
+ :title_x => '',
24
+ :axis_font_size => 10
25
+ }
26
+ ).html_safe
27
+ -%>
28
+ <%- end -%>
29
+ </div>
@@ -0,0 +1,28 @@
1
+ <div class="form_container">
2
+ <%= legend_tag "Exit Pages", :help => 'This chart shows the top 25 pages that users visited last across the selected site(s). Click on any bar in the graph for a count of visits to the corresponding page.' -%>
3
+ <br />
4
+
5
+ <%- if @exit_pages_series.empty? -%>
6
+ <p><em>No data matched your criteria.</em></p>
7
+ <%- else -%>
8
+ <div id="exit_pages_chart" class="chart" style="width: 100%; border: 1px solid #999999; background-color: #ffffff; text-align: center;"></div>
9
+ <%= Seer::visualize(
10
+ @exit_pages_series,
11
+ :as => :bar_chart,
12
+ :in_element => 'exit_pages_chart',
13
+ :series => {:series_label => 'url', :data_method => 'views'},
14
+ :chart_options => {
15
+ :height => @exit_pages_series.size * 20,
16
+ :width => 900,
17
+ :is_3_d => false,
18
+ :legend => 'none',
19
+ :colors => ["#7e7587"],
20
+ :title => "# of Page Views",
21
+ :title_font_size => 9,
22
+ :title_x => '',
23
+ :axis_font_size => 10
24
+ }
25
+ ).html_safe
26
+ -%>
27
+ <%- end -%>
28
+ </div>
@@ -0,0 +1,22 @@
1
+ <form>
2
+ <fieldset class="form_container">
3
+ <%= legend_tag "Traffic Explorer Criteria" -%>
4
+ <br />
5
+ How many
6
+ <%= select_tag "visit_kind", options_for_select((TrackableSession::KINDS | ["total"]), params[:visit_kind] == 'all' ? 'total' : params[:visit_kind] ) -%>
7
+ visits
8
+ <%- if @sites.count > 2 -%>
9
+ to
10
+ <%= select_tag "site", options_for_select(@sites.map{|s| s.downcase}, params[:site] || "all sites") -%>
11
+ <%- end -%>
12
+ resulted in
13
+ <%= select_tag "action_kind", options_for_select(TrackableAction.kinds, params[:action_kind]) -%>
14
+ in the
15
+ <%= select_tag "time_period", options_for_select(@time_periods.map{|t| t.downcase}, params[:time_period]) -%>
16
+ ?
17
+ <div class="link_block">
18
+ <input type="submit" class="link_button" value="Generate Report" />
19
+ <%= link_to 'Back', admin_tracking_root_path, :class => 'link_button' -%>
20
+ </div>
21
+ </fieldset>
22
+ </form>
@@ -0,0 +1,22 @@
1
+ <div class="form_container">
2
+ <%= legend_tag "Traffic Summary" -%>
3
+ <div class="three_column">
4
+ <%= faux_field "Total Visits", @report.total_visits -%>
5
+ <%= faux_field "New Visits", "#{@report.total_new_visits} (#{@report.total_new_visits_percentage})" -%>
6
+ <%= faux_field "Return Visits", "#{@report.total_return_visits} (#{@report.total_return_visits_percentage})" -%>
7
+ </div>
8
+
9
+ <div class="three_column">
10
+ <%= faux_field "Total Pageviews", @report.total_pageviews -%>
11
+ <%= faux_field "Total Leads / Conversion Rate", "#{@report.total_conversions} (#{@report.conversion_rate})", :help => 'The number and percentage of visitors who submitted a contact form.' -%>
12
+ <%= faux_field "Total Intersite Clickthroughs", "#{@report.total_clickthroughs} (#{@report.total_clickthroughs_percentage})", :help => 'The number and percentage of visitors who clicked through from one tracked site to another.' if @sites.count > 2 -%>
13
+ </div>
14
+
15
+ <div class="three_column">
16
+ <%= faux_field "Average Pages / Visit", @report.average_pages_per_visit -%>
17
+ <%= faux_field "Average Visit Length", @report.average_time_on_site -%>
18
+ <%= faux_field "Bounce Rate", @report.bounce_rate, :help => 'The percentage of visitors who left the site after viewing only one page.' -%>
19
+ </div>
20
+
21
+ <br style="clear: both;" />
22
+ </div>
@@ -0,0 +1,28 @@
1
+ <div class="form_container">
2
+ <%= legend_tag "Intersite Referral Destinations", :help => "This graph shows the destinations of links that visitors clicked through to other sites in the network. Click on a bar in the graph below for a count of visits sent to the corresponding site." -%>
3
+ <br />
4
+ <%- if @destinations_series.blank? -%>
5
+ <p><em>No visits matched your criteria.</em></p>
6
+ <%- else -%>
7
+ <div id="destinations_chart" class="chart" style="width: 100%; border: 1px solid #999999; background-color: #ffffff; text-align: center;"></div>
8
+
9
+ <%= Seer::visualize(
10
+ @destinations_series,
11
+ :as => :bar_chart,
12
+ :in_element => 'destinations_chart',
13
+ :series => {:series_label => 'site', :data_method => 'clickthroughs'},
14
+ :chart_options => {
15
+ :height => @destinations_series.size * 20,
16
+ :width => 900,
17
+ :is_3_d => false,
18
+ :legend => 'none',
19
+ :colors => ["#7e7587"],
20
+ :title => "# Referrals by Destination",
21
+ :title_font_size => 9,
22
+ :title_x => '',
23
+ :axis_font_size => 10
24
+ }
25
+ ).html_safe
26
+ -%>
27
+ <%- end -%>
28
+ </div>
@@ -0,0 +1,30 @@
1
+ <div class="form_container">
2
+ <%= legend_tag "Total Intersite Referrals By Week", :help => "This graph shows the total number of clicks that resulted in traffic to other sites in the network. Click on a data point for more details." -%>
3
+ <br />
4
+ <%- if @total_visits.blank? -%>
5
+ <p><em>No visits matched your criteria.</em></p>
6
+ <%- else -%>
7
+ <div id="total_chart" class="chart" style="width: 100%; border: 1px solid #999999; background-color: #ffffff; text-align: center;"></div>
8
+ <%= Seer::visualize(
9
+ @total_visits,
10
+ :as => :line_chart,
11
+ :in_element => 'total_chart',
12
+ :series => {
13
+ :series_label => 'Referrals',
14
+ :data_label => 'short_date',
15
+ :data_method => 'clickthroughs',
16
+ :data_series => @total_visits_series
17
+ },
18
+ :chart_options => {
19
+ :height => 300,
20
+ :width => 900,
21
+ :axis_font_size => 11,
22
+ :colors => ['#7e7587','#7e7e00','#007e7e','#7e0000', '#007e00'],
23
+ :title => "",
24
+ :point_size => 5,
25
+ :legend => 'none'
26
+ }
27
+ ).html_safe
28
+ -%>
29
+ <%- end -%>
30
+ </div>
@@ -0,0 +1,30 @@
1
+ <div class="form_container">
2
+ <%= legend_tag "Number of Leads By Week (#{params[:time_period].titleize})", :help => 'This graph shows the number of leads submitted per week for the specified time period. Click on a data point for a count of leads for the corresponding week.' -%>
3
+ <br />
4
+ <%- if @leads.empty? -%>
5
+
6
+ <%- else -%>
7
+ <div id="leads_chart" class="chart" style="width: 100%; border: 1px solid #999999; background-color: #ffffff; text-align: center;"></div>
8
+ <%= Seer::visualize(
9
+ @leads,
10
+ :as => :line_chart,
11
+ :in_element => 'leads_chart',
12
+ :series => {
13
+ :series_label => 'Leads',
14
+ :data_label => 'short_date',
15
+ :data_method => 'leads',
16
+ :data_series => @leads_series
17
+ },
18
+ :chart_options => {
19
+ :height => 300,
20
+ :width => 900,
21
+ :axis_font_size => 11,
22
+ :colors => ['#7e7587','#7e7e00','#007e7e','#7e0000', '#007e00'],
23
+ :title => "",
24
+ :point_size => 5,
25
+ :legend => 'none'
26
+ }
27
+ ).html_safe
28
+ -%>
29
+ <%- end -%>
30
+ </div>
@@ -0,0 +1,47 @@
1
+ <div class="form_container">
2
+ <%= legend_tag "Top Visitor Locations", :help => 'The map below is a geographical representation of where visitors to the selected site(s) are coming from. The size and darkness of each point on the map corresponds to the number of visits from that location. Click on a point on the map for the name of the location and the number of visits that originated from that location.' -%>
3
+ <br />
4
+ <%- if @locations_series.blank? -%>
5
+ <p><em>No location data matched your criteria.</em></p>
6
+ <%- else -%>
7
+ <div class="chart" style="border: 1px solid #999999;">
8
+ <div id="map_chart" style="width: 100%; background-color: #ecf7fe; text-align: center; padding-top: 1em; padding-bottom: 1em;"></div>
9
+ <div id="locations_chart" style="width: 100%; background-color: #ffffff; text-align: center; padding-top: 1em; padding-bottom: 1em;"></div>
10
+ </div>
11
+ <%= Seer::visualize(
12
+ @locations_series,
13
+ :as => :bar_chart,
14
+ :in_element => 'locations_chart',
15
+ :series => {:series_label => 'sanitized_name', :data_method => 'count'},
16
+ :chart_options => {
17
+ :height => @locations_series.size * 20,
18
+ :width => 900,
19
+ :is_3_d => false,
20
+ :legend => 'none',
21
+ :colors => ["#7e7587"],
22
+ :title => "Visit Count by Location",
23
+ :title_font_size => 9,
24
+ :title_x => '',
25
+ :axis_font_size => 10
26
+ }
27
+ ).html_safe
28
+ -%>
29
+
30
+ <%= Seer::visualize(
31
+ @locations_series,
32
+ :as => :geomap,
33
+ :in_element => 'map_chart',
34
+ :series => {
35
+ :series_label => 'sanitized_name',
36
+ :data_label => '# Visits',
37
+ :data_method => 'count'
38
+ },
39
+ :chart_options => {
40
+ :data_mode => 'markers',
41
+ :region => 'us_metro',
42
+ :colors => ['#bdadce','#7e7587']
43
+ }
44
+ ).html_safe
45
+ -%>
46
+ <%- end -%>
47
+ </div>
@@ -0,0 +1,33 @@
1
+ <div class="form_container">
2
+ <%= legend_tag "Recent Visits", :help => 'Shown below are the 25 most recent visits matching your report criteria. Click on the "Details" link next to a visit for more detailed information.' -%>
3
+
4
+ <%- if @report.recent_sessions.blank? -%>
5
+ <p><em>No visits matched your criteria.</em></p>
6
+ <%- else -%>
7
+ <br />
8
+ <table class="standard">
9
+ <tr>
10
+ <th>Date</th>
11
+ <%- if @sites.size > 2 -%><th>Site</th><%- end -%>
12
+ <th>Referral Type</th>
13
+ <th>Visit Type</th>
14
+ <th>Visit Length</th>
15
+ <th>Pageviews</th>
16
+ <th></th>
17
+ </tr>
18
+ <%- @report.recent_sessions.each do |session| -%>
19
+ <tr class="<%= cycle('odd', 'even') -%>">
20
+ <td><%= session.created_at.to_s(:short_date_time) %></td>
21
+ <%- if @sites.size > 2 -%><td><%= session.site %></td><%- end -%>
22
+ <td><%= session.kind.titleize %></td>
23
+ <td><%= session.visit_type %></td>
24
+ <td><%= session.hr_duration %></td>
25
+ <td><%= session.views_count %></td>
26
+ <td><%= link_to 'Details', admin_tracking_trackable_session_path(session) %></td>
27
+ </tr>
28
+ <%- end -%>
29
+ </table>
30
+ <%- end -%>
31
+
32
+ </div>
33
+
@@ -0,0 +1,28 @@
1
+ <div class="form_container">
2
+ <%= legend_tag "Top Referring Keywords", :help => 'This graph lists the actual search terms that drove traffic to the selected site(s). Click on each bar for a count of visits using a particular keyword phrase.' -%>
3
+ <br />
4
+ <%- if @keywords_series.blank? -%>
5
+ <p><em>No referring keywords found based on your criteria.</em></p>
6
+ <%- else -%>
7
+ <div id="keyword_chart" class="chart" style="width: 100%; border: 1px solid #999999; background-color: #ffffff; text-align: center;"></div>
8
+
9
+ <%= Seer::visualize(
10
+ @keywords_series,
11
+ :as => :bar_chart,
12
+ :in_element => 'keyword_chart',
13
+ :series => {:series_label => 'keyword', :data_method => 'count'},
14
+ :chart_options => {
15
+ :height => @keywords_series.size * 20,
16
+ :width => 900,
17
+ :is_3_d => false,
18
+ :legend => 'none',
19
+ :colors => ["#7e7587"],
20
+ :title => "Visit Count by Keyword",
21
+ :title_font_size => 9,
22
+ :title_x => '',
23
+ :axis_font_size => 10
24
+ }
25
+ ).html_safe
26
+ -%>
27
+ <%- end -%>
28
+ </div>
@@ -0,0 +1,28 @@
1
+ <div class="form_container">
2
+ <%= legend_tag "Top Referring Sites", :help => 'Users visited the selected site(s) via links from sites in the list below. Click on each bar for a count of visits from the corresponding site.' -%>
3
+ <br />
4
+ <%- if @referrers_series.blank? -%>
5
+ <p><em>No referring traffic found based on your criteria.</em></p>
6
+ <%- else -%>
7
+ <div id="referrer_chart" class="chart" style="width: 100%; border: 1px solid #999999; background-color: #ffffff; text-align: center;"></div>
8
+
9
+ <%= Seer::visualize(
10
+ @referrers_series,
11
+ :as => :bar_chart,
12
+ :in_element => 'referrer_chart',
13
+ :series => {:series_label => 'referrer', :data_method => 'count'},
14
+ :chart_options => {
15
+ :height => @referrers_series.size * 20,
16
+ :width => 900,
17
+ :is_3_d => false,
18
+ :legend => 'none',
19
+ :colors => ["#7e7587"],
20
+ :title => "Visit Count by Referrer",
21
+ :title_font_size => 9,
22
+ :title_x => '',
23
+ :axis_font_size => 10
24
+ }
25
+ ).html_safe
26
+ -%>
27
+ <%- end -%>
28
+ </div>
@@ -0,0 +1,26 @@
1
+ <div class="form_container">
2
+ <%= legend_tag "Traffic Summary" -%>
3
+ <div class="three_column">
4
+ <%= faux_field "Total Visits", @report.total_visits -%>
5
+ <%= faux_field "New Visits", "#{@report.total_new_visits} (#{@report.total_new_visits_percentage})" -%>
6
+ <%= faux_field "Return Visits", "#{@report.total_return_visits} (#{@report.total_return_visits_percentage})" -%>
7
+ <%= faux_field "Bounce Rate", @report.bounce_rate, :help => 'The percentage of visitors who left the site after viewing only one page.' -%>
8
+ </div>
9
+
10
+ <div class="three_column">
11
+ <%= faux_field "Visits from Referring Sites", "#{@report.total_organic_visits} (#{@report.total_organic_visits_percentage})" -%>
12
+ <%= faux_field "Visits from Paid Search", "#{@report.total_ppc_visits} (#{@report.total_ppc_visits_percentage})" -%>
13
+ <%= faux_field "Visits from Organic Search", "#{@report.total_search_visits} (#{@report.total_search_visits_percentage})" -%>
14
+ <%= faux_field "Direct Visits", "#{@report.total_direct_visits} (#{@report.total_direct_visits_percentage})", :help => "Direct visits result from using bookmarks or directly typing in a site's URL." -%>
15
+ </div>
16
+
17
+ <div class="three_column">
18
+ <%= faux_field "Total Pageviews", @report.total_pageviews -%>
19
+ <%= faux_field "Total Leads / Conversion Rate", "#{@report.total_conversions} (#{@report.conversion_rate})", :help => 'The number and percentage of visitors who submitted a contact form.' -%>
20
+ <%= faux_field "Total Intersite Clickthroughs", "#{@report.total_clickthroughs} (#{@report.total_clickthroughs_percentage})", :help => 'The number and percentage of visitors who clicked through from one tracked site to another.' if @sites.count > 2 -%>
21
+ <%= faux_field "Average Pages / Visit", @report.average_pages_per_visit -%>
22
+ <%= faux_field "Average Visit Length", @report.average_time_on_site -%>
23
+ </div>
24
+
25
+ <br style="clear: both;" />
26
+ </div>
@@ -0,0 +1,28 @@
1
+ <div class="form_container">
2
+ <%= legend_tag "Top User Agents", :help => 'This graph shows the number of visitors by browser type. Note that "unknown" probably indicates a visit by a search engine spider. Click on a bar in the graph for the exact count of visits for a particular browser.' -%>
3
+ <br />
4
+ <%- if @user_agents_series.blank? -%>
5
+ <p><em>No user agent data matched your criteria.</em></p>
6
+ <%- else -%>
7
+ <div id="user_agents_chart" class="chart" style="width: 100%; border: 1px solid #999999; background-color: #ffffff; text-align: center;"></div>
8
+
9
+ <%= Seer::visualize(
10
+ @user_agents_series,
11
+ :as => :bar_chart,
12
+ :in_element => 'user_agents_chart',
13
+ :series => {:series_label => 'user_agent', :data_method => 'count'},
14
+ :chart_options => {
15
+ :height => @user_agents_series.size * 20,
16
+ :width => 900,
17
+ :is_3_d => false,
18
+ :legend => 'none',
19
+ :colors => ["#7e7587"],
20
+ :title => "Visit Count by Browser",
21
+ :title_font_size => 9,
22
+ :title_x => '',
23
+ :axis_font_size => 10
24
+ }
25
+ ).html_safe
26
+ -%>
27
+ <%- end -%>
28
+ </div>
@@ -1,4 +1,4 @@
1
- <fieldset class="form_container">
1
+ <div class="form_container">
2
2
  <%= legend_tag "Visits by Kind (#{params[:time_period].titleize})", :help => 'This graph shows a breakdown of visits based on the visit source (direct, referring site, organic search, or paid search). Click on a data point in the graph for more information.' -%>
3
3
  <br />
4
4
  <div id="visits_chart" class="chart" style="width: 100%; border: 1px solid #999999; background-color: #ffffff; text-align: center;"></div>
@@ -20,6 +20,6 @@
20
20
  :title => "",
21
21
  :point_size => 5
22
22
  }
23
- )
23
+ ).html_safe
24
24
  -%>
25
- </fieldset>
25
+ </div>
@@ -0,0 +1,12 @@
1
+ <%- set_title 'Top Content Report' -%>
2
+ <%= Seer::init_visualization.html_safe -%>
3
+
4
+ <%= render 'criteria' -%>
5
+
6
+ <br style="clear: both;" />
7
+
8
+ <%- if @report.ready? -%>
9
+ <%= render 'content' -%>
10
+ <%= render 'entrance_pages' -%>
11
+ <%= render 'exit_pages' -%>
12
+ <%- end -%>
@@ -0,0 +1,13 @@
1
+ <%- set_title 'Traffic Explorer' -%>
2
+ <%= Seer::init_visualization.html_safe -%>
3
+
4
+ <%= render 'explorer_criteria' -%>
5
+
6
+ <br style="clear: both;" />
7
+
8
+ <%- if @report.ready? -%>
9
+ <%= render 'explorer_summary' -%>
10
+ <%= render 'visits_by_kind' -%>
11
+ <div class="page_break" /><p>(Continued on next page)</p></div>
12
+ <%= render 'recent_visits' -%>
13
+ <%- end -%>
@@ -0,0 +1,16 @@
1
+ <%- set_title 'Tracking Reports' -%>
2
+
3
+ <p><em>Please choose a report:</em></p>
4
+
5
+ <ul>
6
+ <%= menu_item :heading => "Traffic Summary", :url => admin_tracking_summary_path -%>
7
+ <%= menu_item :heading => "Traffic Explorer", :url => admin_tracking_explorer_path -%>
8
+ <%= menu_item :heading => "Top Content", :url => admin_tracking_content_path -%>
9
+ <%= menu_item :heading => "Intersite Traffic", :url => admin_tracking_intersite_path if @sites.count > 1 -%>
10
+ <%= menu_item :heading => "Leads", :url => admin_tracking_leads_path -%>
11
+ <%= menu_item :heading => "Visitor Profile", :url => admin_tracking_visitor_profile_path -%>
12
+ </ul>
13
+
14
+ <br style="clear: both;" />
15
+
16
+