mitamirri 0.13.8 → 2.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/Capfile +4 -0
- data/Gemfile +29 -0
- data/README.rdoc +6 -55
- data/Rakefile +34 -21
- data/VERSION +1 -1
- data/app/controllers/admin/tracking/reports_controller.rb +78 -0
- data/app/controllers/admin/tracking/trackable_sessions_controller.rb +7 -0
- data/app/controllers/application_controller.rb +1 -8
- data/app/controllers/trackable_actions_controller.rb +0 -2
- data/app/helpers/application_helper.rb +21 -0
- data/app/helpers/layout_helper.rb +18 -0
- data/app/models/content_report.rb +35 -0
- data/app/models/content_stat.rb +4 -0
- data/app/models/destination.rb +4 -0
- data/app/models/intersite_traffic_report.rb +47 -0
- data/app/models/keyword_stat.rb +4 -0
- data/app/models/lead.rb +3 -0
- data/app/models/lead_stat.rb +5 -0
- data/app/models/leads_report.rb +32 -0
- data/app/models/location_stat.rb +37 -0
- data/app/models/referrer_stat.rb +4 -0
- data/app/models/report.rb +83 -0
- data/app/models/stat_base.rb +11 -0
- data/app/models/trackable_action.rb +114 -91
- data/app/models/trackable_base.rb +12 -0
- data/app/models/trackable_location.rb +7 -13
- data/app/models/trackable_session.rb +255 -171
- data/app/models/trackable_stat.rb +45 -27
- data/app/models/traffic_explorer_report.rb +92 -0
- data/app/models/traffic_summary_report.rb +142 -0
- data/app/models/user_agent_stat.rb +4 -0
- data/app/models/visit.rb +6 -0
- data/app/models/visit_stat.rb +5 -0
- data/app/models/visitor.rb +4 -0
- data/app/models/visitor_profile_report.rb +23 -0
- data/app/views/admin/tracking/reports/_content.html.erb +28 -0
- data/app/views/admin/tracking/reports/_conversion_rate.html.erb +30 -0
- data/app/views/admin/tracking/reports/_criteria.html.erb +33 -0
- data/app/views/admin/tracking/reports/_entrance_pages.html.erb +29 -0
- data/app/views/admin/tracking/reports/_exit_pages.html.erb +28 -0
- data/app/views/admin/tracking/reports/_explorer_criteria.html.erb +22 -0
- data/app/views/admin/tracking/reports/_explorer_summary.html.erb +22 -0
- data/app/views/admin/tracking/reports/_intersite_destinations.html.erb +28 -0
- data/app/views/admin/tracking/reports/_intersite_referrals.html.erb +30 -0
- data/app/views/admin/tracking/reports/_leads.html.erb +30 -0
- data/app/views/admin/tracking/reports/_locations.html.erb +47 -0
- data/app/views/admin/tracking/reports/_recent_visits.html.erb +33 -0
- data/app/views/admin/tracking/reports/_referring_keywords.html.erb +28 -0
- data/app/views/admin/tracking/reports/_referring_sites.html.erb +28 -0
- data/app/views/admin/tracking/reports/_traffic_summary.html.erb +26 -0
- data/app/views/admin/tracking/reports/_user_agents.html.erb +28 -0
- data/app/views/{trackable_sessions/_visits_graph.html.erb → admin/tracking/reports/_visits_by_kind.html.erb} +3 -3
- data/app/views/admin/tracking/reports/content.html.erb +12 -0
- data/app/views/admin/tracking/reports/explorer.html.erb +13 -0
- data/app/views/admin/tracking/reports/index.html.erb +16 -0
- data/app/views/admin/tracking/reports/intersite.html.erb +11 -0
- data/app/views/admin/tracking/reports/leads.html.erb +11 -0
- data/app/views/admin/tracking/reports/summary.html.erb +16 -0
- data/app/views/admin/tracking/reports/visitor_profile.html.erb +11 -0
- data/app/views/{trackable_sessions → admin/tracking/trackable_sessions}/show.html.erb +5 -4
- data/app/views/layouts/application.html.erb +51 -18
- data/config.ru +4 -0
- data/config/application.rb +13 -0
- data/config/boot.rb +13 -110
- data/config/cucumber.yml +10 -0
- data/config/deploy.rb +40 -0
- data/config/environment.rb +4 -23
- data/config/environments/development.rb +24 -13
- data/config/environments/production.rb +41 -20
- data/config/environments/test.rb +28 -24
- data/config/initializers/formats.rb +19 -0
- data/config/initializers/metric_fu.rb +9 -0
- data/config/initializers/secret_token.rb +7 -0
- data/config/initializers/session_store.rb +3 -10
- data/config/locales/en.yml +1 -1
- data/config/mongoid.yml +19 -0
- data/config/routes.rb +16 -10
- data/features/access_reports.feature +26 -0
- data/features/step_definitions/reports_steps.rb +9 -0
- data/features/step_definitions/web_steps.rb +219 -0
- data/features/support/env.rb +32 -0
- data/features/support/hooks.rb +1 -0
- data/features/support/paths.rb +33 -0
- data/features/traffic_summary_report.feature +43 -0
- data/init.rb +0 -7
- data/lib/mitamirri.rb +9 -12
- data/lib/mitamirri/engine.rb +7 -0
- data/lib/mitamirri/helper.rb +13 -29
- data/lib/mitamirri/railtie.rb +10 -0
- data/lib/tasks/cucumber.rake +60 -0
- data/lib/tasks/rcov.rake +44 -0
- data/mitamirri.gemspec +228 -100
- data/public/404.html +26 -0
- data/public/422.html +26 -0
- data/public/500.html +26 -0
- data/{config/database.yml → public/favicon.ico} +0 -0
- data/public/images/icons/add.png +0 -0
- data/public/images/icons/collapsed.gif +0 -0
- data/public/images/icons/delete.png +0 -0
- data/public/images/icons/drag.png +0 -0
- data/public/images/icons/edit.png +0 -0
- data/public/images/icons/expanded.gif +0 -0
- data/public/images/icons/help_icon.png +0 -0
- data/public/images/icons/link_icon.png +0 -0
- data/public/images/icons/move.png +0 -0
- data/public/images/icons/move_white.png +0 -0
- data/public/images/icons/note.png +0 -0
- data/public/images/icons/note_white.png +0 -0
- data/public/images/icons/notification_icon_sprite.png +0 -0
- data/public/images/icons/spinner.gif +0 -0
- data/public/images/icons/view.png +0 -0
- data/public/images/icons/warning.png +0 -0
- data/public/images/icons/warning_2.png +0 -0
- data/public/images/icons/warning_box.png +0 -0
- data/public/images/icons/warning_icon.png +0 -0
- data/public/images/icons/warning_white.png +0 -0
- data/public/images/layout/arrow_asc.png +0 -0
- data/public/images/layout/arrow_desc.png +0 -0
- data/public/images/layout/back.png +0 -0
- data/public/images/layout/black_bar.png +0 -0
- data/public/images/layout/branding.png +0 -0
- data/public/images/layout/breadcrumb_bg.png +0 -0
- data/public/images/layout/button_bg.png +0 -0
- data/public/images/layout/content_left_bg.png +0 -0
- data/public/images/layout/content_right_bg.png +0 -0
- data/public/images/layout/footer_bg.png +0 -0
- data/public/images/layout/h1_bg.png +0 -0
- data/public/images/layout/h2_bg.png +0 -0
- data/public/images/layout/h2_bg_for_table.png +0 -0
- data/public/images/layout/header_bg_grey.png +0 -0
- data/public/images/layout/header_bg_purple.png +0 -0
- data/public/images/layout/legend_bg.png +0 -0
- data/public/images/layout/menu_box_bg.png +0 -0
- data/public/images/layout/shadow_border.png +0 -0
- data/public/images/layout/shadow_border_2.png +0 -0
- data/public/images/layout/shadow_border_3.png +0 -0
- data/public/images/layout/shadow_border_4.png +0 -0
- data/public/images/layout/tab.png +0 -0
- data/public/images/layout/tab_active.png +0 -0
- data/public/images/layout/table_header.png +0 -0
- data/public/images/layout/text_field_bg.jpg +0 -0
- data/public/images/layout/text_field_error_bg.png +0 -0
- data/public/images/layout/th_bg.png +0 -0
- data/public/images/layout/th_bg_selected.png +0 -0
- data/public/images/menu_icons/content_report.png +0 -0
- data/public/images/menu_icons/content_report_on.png +0 -0
- data/public/images/menu_icons/funnel.png +0 -0
- data/public/images/menu_icons/funnel_on.png +0 -0
- data/public/images/menu_icons/intersite_traffic.png +0 -0
- data/public/images/menu_icons/intersite_traffic_on.png +0 -0
- data/public/images/menu_icons/leads.png +0 -0
- data/public/images/menu_icons/leads_on.png +0 -0
- data/public/images/menu_icons/traffic_explorer.png +0 -0
- data/public/images/menu_icons/traffic_explorer_on.png +0 -0
- data/public/images/menu_icons/traffic_summary.png +0 -0
- data/public/images/menu_icons/traffic_summary_on.png +0 -0
- data/public/images/menu_icons/visitor_profile.png +0 -0
- data/public/images/menu_icons/visitor_profile_on.png +0 -0
- data/public/index.html +8 -0
- data/public/javascripts/application.js +2 -0
- data/public/javascripts/controls.js +965 -0
- data/public/javascripts/dragdrop.js +974 -0
- data/public/javascripts/effects.js +1123 -0
- data/public/javascripts/prototype.js +6001 -0
- data/public/javascripts/rails.js +175 -0
- data/public/robots.txt +5 -0
- data/public/stylesheets/.gitkeep +0 -0
- data/public/stylesheets/application.css +876 -0
- data/public/stylesheets/core.css +1146 -0
- data/public/stylesheets/core_ie.css +52 -0
- data/public/stylesheets/csshover3.htc +14 -0
- data/public/stylesheets/mitamirri.css +37 -724
- data/public/stylesheets/mitamirri_print.css +3 -0
- data/script/cucumber +10 -0
- data/script/rails +6 -0
- data/spec/blueprints.rb +13 -0
- data/spec/helpers/application_helper_spec.rb +23 -35
- data/spec/{lib → models}/content_report_spec.rb +12 -8
- data/spec/{lib → models}/intersite_traffic_report_spec.rb +6 -9
- data/spec/{lib → models}/leads_report_spec.rb +11 -12
- data/spec/models/location_stat_spec.rb +18 -0
- data/spec/models/trackable_action_spec.rb +46 -14
- data/spec/models/trackable_base_spec.rb +27 -0
- data/spec/models/trackable_session_spec.rb +181 -57
- data/spec/{lib/session_report_spec.rb → models/traffic_explorer_report_spec.rb} +8 -25
- data/spec/spec_helper.rb +8 -28
- data/{lib/mitamirri/tasks.rb → tasks/mitamirri.rake} +6 -7
- data/vendor/plugins/.gitkeep +0 -0
- metadata +316 -77
- data/.gitignore +0 -26
- data/app/controllers/trackable_sessions_controller.rb +0 -100
- data/app/views/trackable_sessions/_keywords_graph.html.erb +0 -24
- data/app/views/trackable_sessions/_print_buttons.html.erb +0 -3
- data/app/views/trackable_sessions/_sessions.html.erb +0 -26
- data/app/views/trackable_sessions/_top_referrers.html.erb +0 -24
- data/app/views/trackable_sessions/_traffic_summary_all.html.erb +0 -64
- data/app/views/trackable_sessions/_traffic_summary_by_kind.html.erb +0 -48
- data/app/views/trackable_sessions/content.html.erb +0 -119
- data/app/views/trackable_sessions/explorer.html.erb +0 -67
- data/app/views/trackable_sessions/export.xls.erb +0 -5
- data/app/views/trackable_sessions/index.html.erb +0 -47
- data/app/views/trackable_sessions/intersite.html.erb +0 -97
- data/app/views/trackable_sessions/leads.html.erb +0 -98
- data/app/views/trackable_sessions/visitor_profile.html.erb +0 -114
- data/config/initializers/backtrace_silencers.rb +0 -7
- data/config/initializers/database.rb +0 -1
- data/config/initializers/inflections.rb +0 -10
- data/config/initializers/mime_types.rb +0 -5
- data/config/initializers/new_rails_defaults.rb +0 -21
- data/db/development.sqlite3 +0 -0
- data/db/migrate/20100810173533_create_trackable_sessions.rb +0 -23
- data/db/migrate/20100810173605_create_trackable_actions.rb +0 -20
- data/db/test.sqlite3 +0 -1
- data/lib/mitamirri/content_report.rb +0 -75
- data/lib/mitamirri/intersite_traffic_report.rb +0 -122
- data/lib/mitamirri/leads_report.rb +0 -90
- data/lib/mitamirri/session_report.rb +0 -219
- data/lib/mitamirri/stat_report.rb +0 -216
- data/lib/mitamirri/visitor_profile_report.rb +0 -127
- data/script/about +0 -4
- data/script/console +0 -3
- data/script/dbconsole +0 -3
- data/script/destroy +0 -3
- data/script/generate +0 -3
- data/script/performance/benchmarker +0 -3
- data/script/performance/profiler +0 -3
- data/script/plugin +0 -3
- data/script/runner +0 -3
- data/script/server +0 -3
- data/spec/controllers/trackable_actions_controller_spec.rb +0 -5
- data/spec/controllers/trackable_sessions_controller_spec.rb +0 -5
- data/spec/custom_matchers.rb +0 -23
- data/spec/lib/stat_report_spec.rb +0 -106
- data/spec/rcov.opts +0 -4
- data/spec/schema.rb +0 -34
- data/spec/spec.opts +0 -4
@@ -1,5 +0,0 @@
|
|
1
|
-
Date Site Visit Type Referral Type IP Address Pageviews Duration Referrer Keywords Entrance Page Exit Page
|
2
|
-
<%- @sessions.each do |session| -%>
|
3
|
-
<%= session.created_at.to_s(:short_date_time) -%> <%= session.site -%> <%= session.visit_type -%> <%= session.kind.titleize -%> <%= session.ip_address -%> <%= session.views_count -%> <%= session.hr_duration -%> <%= session.referrer -%> <%= session.referring_keywords -%> <%= session.entrance_page -%> <%= session.exit_page -%>
|
4
|
-
|
5
|
-
<%- end -%>
|
@@ -1,47 +0,0 @@
|
|
1
|
-
<%= Seer::init_visualization -%>
|
2
|
-
|
3
|
-
<%- title "Traffic Summary" -%>
|
4
|
-
|
5
|
-
<%- unless @sessions -%>
|
6
|
-
<div class="note"><span class="notification info"></span><p>This report provides a high-level overview of traffic for the selected site(s), including traffic by kind, total visits, top referring keywords, and top referring sites.</p></div>
|
7
|
-
<%- end -%>
|
8
|
-
|
9
|
-
<%- if @sites.size == 1 -%>
|
10
|
-
<p><b>No traffic data has been gathered yet. Please try again later.</b></p>
|
11
|
-
<%- else -%>
|
12
|
-
<form>
|
13
|
-
<fieldset class="form_container">
|
14
|
-
<%= legend_tag "Report Criteria" -%>
|
15
|
-
<div class="three_column">
|
16
|
-
<fieldset>
|
17
|
-
<label for="site">Site:</label><br />
|
18
|
-
<%= select_tag "site", options_for_select(@sites, params[:site] || "All Sites") -%>
|
19
|
-
</fieldset>
|
20
|
-
</div>
|
21
|
-
<div class="three_column">
|
22
|
-
<fieldset>
|
23
|
-
<label for="time_period">Time Period:</label><br />
|
24
|
-
<%= select_tag "time_period", options_for_select(@time_periods, params[:time_period].titleize) -%>
|
25
|
-
</fieldset>
|
26
|
-
</div>
|
27
|
-
</fieldset>
|
28
|
-
<input type="submit" class="button" value="Generate Report" />
|
29
|
-
</form>
|
30
|
-
<%- end -%>
|
31
|
-
|
32
|
-
<br style="clear: both;" />
|
33
|
-
|
34
|
-
<%- if @sessions -%>
|
35
|
-
<%= render "traffic_summary_all" if params[:visit_kind] == 'all' -%>
|
36
|
-
<%= render "traffic_summary_by_kind" if params[:visit_kind] != 'all' -%>
|
37
|
-
<%= render 'visits_graph' -%>
|
38
|
-
<%= page_break -%>
|
39
|
-
<%= render 'keywords_graph' unless @keywords_series.blank? -%>
|
40
|
-
<%= render "top_referrers" unless @referrers_series.blank? -%>
|
41
|
-
<%= page_break -%>
|
42
|
-
<fieldset class="form_container">
|
43
|
-
<%= 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.' -%>
|
44
|
-
<%= render 'sessions' -%>
|
45
|
-
</fieldset>
|
46
|
-
<%= render 'print_buttons' -%>
|
47
|
-
<%- end -%>
|
@@ -1,97 +0,0 @@
|
|
1
|
-
<%= Seer::init_visualization -%>
|
2
|
-
|
3
|
-
<%- title "Intersite Traffic Report" -%>
|
4
|
-
|
5
|
-
<%- if @total_visits.blank? -%>
|
6
|
-
<div class="note"><span class="notification info"></span><p>This report shows traffic between different sites, e.g. a link from a local site to a corporate home page or from one local site to another.</p></div>
|
7
|
-
<%- end -%>
|
8
|
-
|
9
|
-
<%- if @sites.size == 1 -%>
|
10
|
-
<p><b>No traffic data has been gathered yet. Please try again later.</b></p>
|
11
|
-
<%- else -%>
|
12
|
-
<form>
|
13
|
-
<fieldset class="form_container">
|
14
|
-
<%= legend_tag "Report Criteria" -%>
|
15
|
-
<div class="three_column">
|
16
|
-
<fieldset>
|
17
|
-
<label for="site">Site:</label><br />
|
18
|
-
<%= select_tag "site", options_for_select(@sites, params[:site] || "All Sites") -%>
|
19
|
-
</fieldset>
|
20
|
-
</div>
|
21
|
-
<div class="three_column">
|
22
|
-
<fieldset>
|
23
|
-
<label for="time_period">Time Period:</label><br />
|
24
|
-
<%= select_tag "time_period", options_for_select(@time_periods, params[:time_period].titleize) -%>
|
25
|
-
</fieldset>
|
26
|
-
</div>
|
27
|
-
<div class="three_column">
|
28
|
-
<fieldset>
|
29
|
-
<label for="visit_kind">Traffic Type:</label><br />
|
30
|
-
<%= select_tag "visit_kind", options_for_select(TrackableSession.kinds_for_select, params[:visit_kind] || "All") -%>
|
31
|
-
</fieldset>
|
32
|
-
</div>
|
33
|
-
</fieldset>
|
34
|
-
<input type="submit" class="button" value="Generate Report" />
|
35
|
-
</form>
|
36
|
-
<%- end -%>
|
37
|
-
|
38
|
-
<br style="clear: both;" />
|
39
|
-
|
40
|
-
<%- if ! params[:site].blank? && (@total_visits.blank? || @destinations_series.blank?) -%>
|
41
|
-
<p><b>No data matched your criteria.</b></p>
|
42
|
-
<%- elsif params[:site] -%>
|
43
|
-
<fieldset class="form_container">
|
44
|
-
<%= 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." -%>
|
45
|
-
<br />
|
46
|
-
<div id="total_chart" class="chart" style="width: 100%; border: 1px solid #999999; background-color: #ffffff; text-align: center;"></div>
|
47
|
-
<%= Seer::visualize(
|
48
|
-
@total_visits,
|
49
|
-
:as => :line_chart,
|
50
|
-
:in_element => 'total_chart',
|
51
|
-
:series => {
|
52
|
-
:series_label => 'Referrals',
|
53
|
-
:data_label => 'short_date',
|
54
|
-
:data_method => 'clickthroughs',
|
55
|
-
:data_series => @total_visits_series
|
56
|
-
},
|
57
|
-
:chart_options => {
|
58
|
-
:height => 300,
|
59
|
-
:width => 900,
|
60
|
-
:axis_font_size => 11,
|
61
|
-
:colors => ['#7e7587','#7e7e00','#007e7e','#7e0000', '#007e00'],
|
62
|
-
:title => "",
|
63
|
-
:point_size => 5,
|
64
|
-
:legend => 'none'
|
65
|
-
}
|
66
|
-
)
|
67
|
-
-%>
|
68
|
-
</fieldset>
|
69
|
-
|
70
|
-
<fieldset class="form_container">
|
71
|
-
<%= 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." -%>
|
72
|
-
<br />
|
73
|
-
<div id="destinations_chart" class="chart" style="width: 100%; border: 1px solid #999999; background-color: #ffffff; text-align: center;"></div>
|
74
|
-
|
75
|
-
<%= Seer::visualize(
|
76
|
-
@destinations_series,
|
77
|
-
:as => :bar_chart,
|
78
|
-
:in_element => 'destinations_chart',
|
79
|
-
:series => {:series_label => 'site', :data_method => 'clickthroughs'},
|
80
|
-
:chart_options => {
|
81
|
-
:height => @destinations_series.size * 20,
|
82
|
-
:width => 900,
|
83
|
-
:is_3_d => false,
|
84
|
-
:legend => 'none',
|
85
|
-
:colors => ["#7e7587"],
|
86
|
-
:title => "# Referrals by Destination",
|
87
|
-
:title_font_size => 9,
|
88
|
-
:title_x => '',
|
89
|
-
:axis_font_size => 10
|
90
|
-
}
|
91
|
-
)
|
92
|
-
-%>
|
93
|
-
</fieldset>
|
94
|
-
|
95
|
-
<%= render 'print_buttons' -%>
|
96
|
-
|
97
|
-
<%- end -%>
|
@@ -1,98 +0,0 @@
|
|
1
|
-
<%- set_title "Leads Report" -%>
|
2
|
-
|
3
|
-
<%- if @leads.blank? -%>
|
4
|
-
<div class="note"><span class="notification info"></span><p>This report shows the total number of visits that resulted in leads for the specified site(s), time period, and traffic type, as well as the overall conversion rate.<br />(Note that in this case 'leads' refers to contact forms submitted.)</p></div>
|
5
|
-
<%- end -%>
|
6
|
-
|
7
|
-
<%- if @sites.size == 1 -%>
|
8
|
-
<p><b>No traffic data has been gathered yet. Please try again later.</b></p>
|
9
|
-
<%- else -%>
|
10
|
-
<form>
|
11
|
-
<fieldset class="form_container">
|
12
|
-
<%= legend_tag "Report Criteria" -%>
|
13
|
-
<div class="three_column">
|
14
|
-
<fieldset>
|
15
|
-
<label for="site">Site:</label><br />
|
16
|
-
<%= select_tag "site", options_for_select(@sites, params[:site] || "All Sites") -%>
|
17
|
-
</fieldset>
|
18
|
-
</div>
|
19
|
-
<div class="three_column">
|
20
|
-
<fieldset>
|
21
|
-
<label for="time_period">Time Period:</label><br />
|
22
|
-
<%= select_tag "time_period", options_for_select(@time_periods, params[:time_period].titleize) -%>
|
23
|
-
</fieldset>
|
24
|
-
</div>
|
25
|
-
<div class="three_column">
|
26
|
-
<fieldset>
|
27
|
-
<label for="visit_kind">Traffic Type:</label><br />
|
28
|
-
<%= select_tag "visit_kind", options_for_select(TrackableSession.kinds_for_select, params[:visit_kind] || "All") -%>
|
29
|
-
</fieldset>
|
30
|
-
</div>
|
31
|
-
</fieldset>
|
32
|
-
<input type="submit" class="button" value="Generate Report" />
|
33
|
-
</form>
|
34
|
-
<%- end -%>
|
35
|
-
|
36
|
-
<%- unless @leads.blank? -%>
|
37
|
-
|
38
|
-
<br style="clear: both;" />
|
39
|
-
|
40
|
-
<%= Seer::init_visualization -%>
|
41
|
-
|
42
|
-
<fieldset class="form_container">
|
43
|
-
<%= legend_tag "Number 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.' -%>
|
44
|
-
<br />
|
45
|
-
<div id="leads_chart" class="chart" style="width: 100%; border: 1px solid #999999; background-color: #ffffff; text-align: center;"></div>
|
46
|
-
<%= Seer::visualize(
|
47
|
-
@leads,
|
48
|
-
:as => :line_chart,
|
49
|
-
:in_element => 'leads_chart',
|
50
|
-
:series => {
|
51
|
-
:series_label => 'Leads',
|
52
|
-
:data_label => 'short_date',
|
53
|
-
:data_method => 'leads',
|
54
|
-
:data_series => @leads_series
|
55
|
-
},
|
56
|
-
:chart_options => {
|
57
|
-
:height => 300,
|
58
|
-
:width => 900,
|
59
|
-
:axis_font_size => 11,
|
60
|
-
:colors => ['#7e7587','#7e7e00','#007e7e','#7e0000', '#007e00'],
|
61
|
-
:title => "",
|
62
|
-
:point_size => 5,
|
63
|
-
:legend => 'none'
|
64
|
-
}
|
65
|
-
)
|
66
|
-
-%>
|
67
|
-
</fieldset>
|
68
|
-
|
69
|
-
<fieldset class="form_container">
|
70
|
-
<%= legend_tag "Visit-to-Lead Conversion Rate (#{params[:time_period].titleize})", :help => 'This graph shows the overall conversion rate week-over-week, which is the percentage of visits that resulted in a lead being submitted. Click on a data point for the conversion rate for the corresponding week.' -%>
|
71
|
-
<br />
|
72
|
-
<div id="conversions_chart" class="chart" style="width: 100%; border: 1px solid #999999; background-color: #ffffff; text-align: center;"></div>
|
73
|
-
<%= Seer::visualize(
|
74
|
-
@leads,
|
75
|
-
:as => :line_chart,
|
76
|
-
:in_element => 'conversions_chart',
|
77
|
-
:series => {
|
78
|
-
:series_label => 'Conversion Rate',
|
79
|
-
:data_label => 'short_date',
|
80
|
-
:data_method => 'conversion_rate',
|
81
|
-
:data_series => @leads_series
|
82
|
-
},
|
83
|
-
:chart_options => {
|
84
|
-
:height => 300,
|
85
|
-
:width => 900,
|
86
|
-
:axis_font_size => 11,
|
87
|
-
:colors => ['#7e7587','#7e7e00','#007e7e','#7e0000', '#007e00'],
|
88
|
-
:title => "",
|
89
|
-
:point_size => 5,
|
90
|
-
:legend => 'none'
|
91
|
-
}
|
92
|
-
)
|
93
|
-
-%>
|
94
|
-
</fieldset>
|
95
|
-
|
96
|
-
<%= render 'print_buttons' -%>
|
97
|
-
|
98
|
-
<%- end -%>
|
@@ -1,114 +0,0 @@
|
|
1
|
-
<%- set_title "Visitor Profile Report" -%>
|
2
|
-
|
3
|
-
<%- unless @report -%>
|
4
|
-
<div class="note"><span class="notification info"></span><p>This report provides information about visitors to the specified site(s), time period, and traffic type, as well as the overall conversion rate.</p></div>
|
5
|
-
<%- end -%>
|
6
|
-
|
7
|
-
<%- if @sites.size == 1 -%>
|
8
|
-
<p><b>No traffic data has been gathered yet. Please try again later.</b></p>
|
9
|
-
<%- else -%>
|
10
|
-
<form>
|
11
|
-
<fieldset class="form_container">
|
12
|
-
<%= legend_tag "Report Criteria" -%>
|
13
|
-
<div class="three_column">
|
14
|
-
<fieldset>
|
15
|
-
<label for="site">Site:</label><br />
|
16
|
-
<%= select_tag "site", options_for_select(@sites, params[:site] || "All Sites") -%>
|
17
|
-
</fieldset>
|
18
|
-
</div>
|
19
|
-
<div class="three_column">
|
20
|
-
<fieldset>
|
21
|
-
<label for="time_period">Time Period:</label><br />
|
22
|
-
<%= select_tag "time_period", options_for_select(@time_periods, params[:time_period].titleize) -%>
|
23
|
-
</fieldset>
|
24
|
-
</div>
|
25
|
-
<div class="three_column">
|
26
|
-
<fieldset>
|
27
|
-
<label for="visit_kind">Traffic Type:</label><br />
|
28
|
-
<%= select_tag "visit_kind", options_for_select(TrackableSession.kinds_for_select, params[:visit_kind] || "All") -%>
|
29
|
-
</fieldset>
|
30
|
-
</div>
|
31
|
-
</fieldset>
|
32
|
-
<input type="submit" class="button" value="Generate Report" />
|
33
|
-
</form>
|
34
|
-
<%- end -%>
|
35
|
-
|
36
|
-
<%- if @report -%>
|
37
|
-
|
38
|
-
<br style="clear: both;" />
|
39
|
-
|
40
|
-
<%= Seer::init_visualization -%>
|
41
|
-
|
42
|
-
<fieldset class="form_container">
|
43
|
-
<%= 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.' -%>
|
44
|
-
<br />
|
45
|
-
<div id="user_agents_chart" class="chart" style="width: 100%; border: 1px solid #999999; background-color: #ffffff; text-align: center;"></div>
|
46
|
-
|
47
|
-
<%= Seer::visualize(
|
48
|
-
@user_agents_series,
|
49
|
-
:as => :bar_chart,
|
50
|
-
:in_element => 'user_agents_chart',
|
51
|
-
:series => {:series_label => 'user_agent', :data_method => 'count'},
|
52
|
-
:chart_options => {
|
53
|
-
:height => @user_agents_series.size * 20,
|
54
|
-
:width => 900,
|
55
|
-
:is_3_d => false,
|
56
|
-
:legend => 'none',
|
57
|
-
:colors => ["#7e7587"],
|
58
|
-
:title => "Visit Count by Browser",
|
59
|
-
:title_font_size => 9,
|
60
|
-
:title_x => '',
|
61
|
-
:axis_font_size => 10
|
62
|
-
}
|
63
|
-
)
|
64
|
-
-%>
|
65
|
-
</fieldset>
|
66
|
-
|
67
|
-
<fieldset class="form_container">
|
68
|
-
<%= 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.' -%>
|
69
|
-
<br />
|
70
|
-
<div class="chart" style="border: 1px solid #999999;">
|
71
|
-
<div id="map_chart" style="width: 100%; background-color: #ecf7fe; text-align: center; padding-top: 1em; padding-bottom: 1em;"></div>
|
72
|
-
<div id="locations_chart" style="width: 100%; background-color: #ffffff; text-align: center; padding-top: 1em; padding-bottom: 1em;"></div>
|
73
|
-
</div>
|
74
|
-
<%= Seer::visualize(
|
75
|
-
@locations_series,
|
76
|
-
:as => :bar_chart,
|
77
|
-
:in_element => 'locations_chart',
|
78
|
-
:series => {:series_label => 'sanitized_name', :data_method => 'count'},
|
79
|
-
:chart_options => {
|
80
|
-
:height => @locations_series.size * 20,
|
81
|
-
:width => 900,
|
82
|
-
:is_3_d => false,
|
83
|
-
:legend => 'none',
|
84
|
-
:colors => ["#7e7587"],
|
85
|
-
:title => "Visit Count by Location",
|
86
|
-
:title_font_size => 9,
|
87
|
-
:title_x => '',
|
88
|
-
:axis_font_size => 10
|
89
|
-
}
|
90
|
-
)
|
91
|
-
-%>
|
92
|
-
|
93
|
-
<%= Seer::visualize(
|
94
|
-
@locations_series,
|
95
|
-
:as => :geomap,
|
96
|
-
:in_element => 'map_chart',
|
97
|
-
:series => {
|
98
|
-
:series_label => 'sanitized_name',
|
99
|
-
:data_label => '# Visits',
|
100
|
-
:data_method => 'count'
|
101
|
-
},
|
102
|
-
:chart_options => {
|
103
|
-
:data_mode => 'markers',
|
104
|
-
:region => 'us_metro',
|
105
|
-
:colors => ['#bdadce','#7e7587']
|
106
|
-
}
|
107
|
-
)
|
108
|
-
-%>
|
109
|
-
|
110
|
-
</fieldset>
|
111
|
-
|
112
|
-
<%= render 'print_buttons' -%>
|
113
|
-
|
114
|
-
<%- end -%>
|
@@ -1,7 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
-
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
-
|
6
|
-
# You can also remove all the silencers if you're trying do debug a problem that might steem from framework code.
|
7
|
-
# Rails.backtrace_cleaner.remove_silencers!
|
@@ -1 +0,0 @@
|
|
1
|
-
MongoMapper.database = "mitamirri_#{Rails.env}_#{Time.zone.now.to_i}"
|
@@ -1,10 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# Add new inflection rules using the following format
|
4
|
-
# (all these examples are active by default):
|
5
|
-
# ActiveSupport::Inflector.inflections do |inflect|
|
6
|
-
# inflect.plural /^(ox)$/i, '\1en'
|
7
|
-
# inflect.singular /^(ox)en/i, '\1'
|
8
|
-
# inflect.irregular 'person', 'people'
|
9
|
-
# inflect.uncountable %w( fish sheep )
|
10
|
-
# end
|
@@ -1,21 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# These settings change the behavior of Rails 2 apps and will be defaults
|
4
|
-
# for Rails 3. You can remove this initializer when Rails 3 is released.
|
5
|
-
|
6
|
-
if defined?(ActiveRecord)
|
7
|
-
# Include Active Record class name as root for JSON serialized output.
|
8
|
-
ActiveRecord::Base.include_root_in_json = true
|
9
|
-
|
10
|
-
# Store the full class name (including module namespace) in STI type column.
|
11
|
-
ActiveRecord::Base.store_full_sti_class = true
|
12
|
-
end
|
13
|
-
|
14
|
-
ActionController::Routing.generate_best_match = false
|
15
|
-
|
16
|
-
# Use ISO 8601 format for JSON serialized times and dates.
|
17
|
-
ActiveSupport.use_standard_json_time_format = true
|
18
|
-
|
19
|
-
# Don't escape HTML entities in JSON, leave that for the #json_escape helper.
|
20
|
-
# if you're including raw json in an HTML page.
|
21
|
-
ActiveSupport.escape_html_entities_in_json = false
|
data/db/development.sqlite3
DELETED
Binary file
|
@@ -1,23 +0,0 @@
|
|
1
|
-
class CreateTrackableSessions < ActiveRecord::Migration
|
2
|
-
def self.up
|
3
|
-
create_table :trackable_sessions do |t|
|
4
|
-
t.string :kind
|
5
|
-
t.string :ip_address
|
6
|
-
t.string :site
|
7
|
-
t.string :referrer
|
8
|
-
t.string :session_id
|
9
|
-
t.boolean :new_visit
|
10
|
-
t.timestamps
|
11
|
-
end
|
12
|
-
add_index :trackable_sessions, :kind
|
13
|
-
add_index :trackable_sessions, :ip_address
|
14
|
-
add_index :trackable_sessions, :referrer
|
15
|
-
add_index :trackable_sessions, :site
|
16
|
-
add_index :trackable_sessions, :session_id
|
17
|
-
add_index :trackable_sessions, :new_visit
|
18
|
-
end
|
19
|
-
|
20
|
-
def self.down
|
21
|
-
drop_table :trackable_sessions
|
22
|
-
end
|
23
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
class CreateTrackableActions < ActiveRecord::Migration
|
2
|
-
def self.up
|
3
|
-
create_table :trackable_actions do |t|
|
4
|
-
t.integer :trackable_session_id
|
5
|
-
t.string :kind
|
6
|
-
t.string :label
|
7
|
-
t.string :referrer
|
8
|
-
t.string :url
|
9
|
-
t.timestamps
|
10
|
-
end
|
11
|
-
add_index :trackable_actions, :kind
|
12
|
-
add_index :trackable_actions, :label
|
13
|
-
add_index :trackable_actions, :url
|
14
|
-
add_index :trackable_actions, :trackable_session_id
|
15
|
-
end
|
16
|
-
|
17
|
-
def self.down
|
18
|
-
drop_table :trackable_actions
|
19
|
-
end
|
20
|
-
end
|