ahoy_captain 0.11.1 → 0.76

Sign up to get free protection for your applications and to get access to all the features.
Files changed (190) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +13 -25
  3. data/Rakefile +2 -23
  4. data/app/assets/javascript/ahoy_captain/application.js +4 -4
  5. data/app/assets/javascript/ahoy_captain/controllers/application.js +5 -5
  6. data/app/assets/javascript/ahoy_captain/controllers/application_controller.js +8 -27
  7. data/app/assets/javascript/ahoy_captain/controllers/details_modal_controller.js +5 -5
  8. data/app/assets/javascript/ahoy_captain/controllers/dropdown_label_controller.js +2 -2
  9. data/app/assets/javascript/ahoy_captain/controllers/filter_controller.js +145 -0
  10. data/app/assets/javascript/ahoy_captain/controllers/filter_tag_controller.js +17 -0
  11. data/app/assets/javascript/ahoy_captain/controllers/funnel_chart_controller.js +127 -113
  12. data/app/assets/javascript/ahoy_captain/controllers/index.js +3 -4
  13. data/app/assets/javascript/ahoy_captain/controllers/link_controller.js +43 -0
  14. data/app/assets/javascript/ahoy_captain/controllers/navigation_controller.js +25 -0
  15. data/app/assets/javascript/ahoy_captain/controllers/realtime_controller.js +9 -12
  16. data/app/components/ahoy_captain/dropdown_button_component.html.erb +5 -5
  17. data/app/components/ahoy_captain/dropdown_link_component.html.erb +7 -5
  18. data/app/components/ahoy_captain/dropdown_link_component.rb +0 -4
  19. data/app/components/ahoy_captain/filter/modal_component.html.erb +9 -12
  20. data/app/components/ahoy_captain/filter/select_component.html.erb +19 -23
  21. data/app/components/ahoy_captain/filter/select_component.rb +9 -41
  22. data/app/components/ahoy_captain/filter/tag_component.html.erb +4 -8
  23. data/app/components/ahoy_captain/filter/tag_component.rb +30 -6
  24. data/app/components/ahoy_captain/filter/tag_container_component.html.erb +3 -2
  25. data/app/components/ahoy_captain/filter/tag_container_component.rb +8 -1
  26. data/app/components/ahoy_captain/sticky_nav_component.html.erb +33 -28
  27. data/app/components/ahoy_captain/sticky_nav_component.rb +0 -19
  28. data/app/components/ahoy_captain/table_component.html.erb +37 -4
  29. data/app/components/ahoy_captain/table_component.rb +5 -25
  30. data/app/components/ahoy_captain/tile_component.html.erb +10 -21
  31. data/app/components/ahoy_captain/tile_component.rb +2 -10
  32. data/app/components/ahoy_captain/tooltip_component.html.erb +2 -2
  33. data/app/controllers/ahoy_captain/application_controller.rb +30 -23
  34. data/app/controllers/ahoy_captain/campaigns_controller.rb +10 -2
  35. data/app/controllers/ahoy_captain/cities_controller.rb +24 -0
  36. data/app/controllers/ahoy_captain/countries_controller.rb +24 -0
  37. data/app/controllers/ahoy_captain/devices_controller.rb +6 -3
  38. data/app/controllers/ahoy_captain/entry_pages_controller.rb +4 -2
  39. data/app/controllers/ahoy_captain/exit_pages_controller.rb +4 -3
  40. data/app/controllers/ahoy_captain/filters/base_controller.rb +3 -1
  41. data/app/controllers/ahoy_captain/filters/pages/actions_controller.rb +1 -1
  42. data/app/controllers/ahoy_captain/filters/pages/entry_pages_controller.rb +3 -3
  43. data/app/controllers/ahoy_captain/filters/pages/exit_pages_controller.rb +3 -2
  44. data/app/controllers/ahoy_captain/filters/sources_controller.rb +1 -1
  45. data/app/controllers/ahoy_captain/filters/utms_controller.rb +1 -1
  46. data/app/controllers/ahoy_captain/realtimes_controller.rb +1 -1
  47. data/app/controllers/ahoy_captain/regions_controller.rb +24 -0
  48. data/app/controllers/ahoy_captain/sources_controller.rb +5 -2
  49. data/app/controllers/ahoy_captain/stats/base_controller.rb +0 -142
  50. data/app/controllers/ahoy_captain/stats/bounce_rates_controller.rb +2 -4
  51. data/app/controllers/ahoy_captain/stats/total_pageviews_controller.rb +1 -2
  52. data/app/controllers/ahoy_captain/stats/total_visits_controller.rb +1 -2
  53. data/app/controllers/ahoy_captain/stats/unique_visitors_controller.rb +1 -3
  54. data/app/controllers/ahoy_captain/stats/views_per_visits_controller.rb +8 -3
  55. data/app/controllers/ahoy_captain/stats/visit_durations_controller.rb +1 -2
  56. data/app/controllers/ahoy_captain/top_pages_controller.rb +8 -2
  57. data/app/decorators/ahoy_captain/application_decorator.rb +3 -27
  58. data/app/decorators/ahoy_captain/campaign_decorator.rb +0 -8
  59. data/app/decorators/ahoy_captain/city_decorator.rb +0 -12
  60. data/app/decorators/ahoy_captain/country_decorator.rb +0 -10
  61. data/app/decorators/ahoy_captain/device_decorator.rb +2 -13
  62. data/app/decorators/ahoy_captain/page_decorator.rb +0 -11
  63. data/app/decorators/ahoy_captain/region_decorator.rb +0 -16
  64. data/app/decorators/ahoy_captain/source_decorator.rb +0 -7
  65. data/app/helpers/ahoy_captain/application_helper.rb +3 -60
  66. data/app/models/ahoy_captain/current.rb +9 -0
  67. data/app/models/ahoy_captain/rangeable.rb +3 -0
  68. data/app/models/ahoy_captain/url_helpers.rb +6 -0
  69. data/app/models/concerns/ahoy_captain/range_options.rb +14 -1
  70. data/app/presenters/ahoy_captain/dashboard_presenter.rb +46 -18
  71. data/app/presenters/ahoy_captain/funnel_presenter.rb +29 -32
  72. data/app/presenters/ahoy_captain/goals_presenter.rb +23 -33
  73. data/app/queries/ahoy_captain/application_query.rb +13 -81
  74. data/app/queries/ahoy_captain/entry_pages_query.rb +2 -3
  75. data/app/queries/ahoy_captain/event_query.rb +8 -30
  76. data/app/queries/ahoy_captain/exit_pages_query.rb +4 -6
  77. data/app/queries/ahoy_captain/stats/average_views_per_visit_query.rb +4 -11
  78. data/app/queries/ahoy_captain/stats/average_visit_duration_query.rb +7 -15
  79. data/app/queries/ahoy_captain/stats/bounce_rates_query.rb +7 -24
  80. data/app/queries/ahoy_captain/stats/total_pageviews_query.rb +2 -2
  81. data/app/queries/ahoy_captain/stats/total_visitors_query.rb +2 -2
  82. data/app/queries/ahoy_captain/stats/unique_visitors_query.rb +2 -2
  83. data/app/queries/ahoy_captain/stats/views_per_visit_query.rb +3 -3
  84. data/app/queries/ahoy_captain/stats/visit_duration_query.rb +5 -5
  85. data/app/queries/ahoy_captain/visit_query.rb +13 -12
  86. data/app/views/ahoy_captain/devices/index.html+details.erb +1 -1
  87. data/app/views/ahoy_captain/devices/index.html.erb +2 -2
  88. data/app/views/ahoy_captain/funnels/show.html.erb +2 -5
  89. data/app/views/ahoy_captain/goals/index.html.erb +37 -2
  90. data/app/views/ahoy_captain/layouts/application.html.erb +4 -3
  91. data/app/views/ahoy_captain/realtimes/show.html.erb +1 -1
  92. data/app/views/ahoy_captain/roots/show.html.erb +118 -117
  93. data/app/views/ahoy_captain/stats/base/index.html.erb +1 -38
  94. data/app/views/ahoy_captain/stats/show.html.erb +56 -14
  95. data/config/routes.rb +3 -16
  96. data/lib/ahoy_captain/ahoy/event_methods.rb +75 -36
  97. data/lib/ahoy_captain/ahoy/visit_methods.rb +1 -1
  98. data/lib/ahoy_captain/configuration.rb +7 -18
  99. data/lib/ahoy_captain/engine.rb +0 -22
  100. data/lib/ahoy_captain/goals.rb +4 -16
  101. data/lib/ahoy_captain/period_collection.rb +1 -1
  102. data/lib/ahoy_captain/version.rb +1 -1
  103. data/lib/ahoy_captain.rb +1 -8
  104. data/lib/generators/ahoy_captain/templates/config.rb.tt +3 -50
  105. metadata +17 -185
  106. data/app/assets/javascript/ahoy_captain/controllers/combobox_controller.js +0 -371
  107. data/app/assets/javascript/ahoy_captain/controllers/filter/item_controller.js +0 -12
  108. data/app/assets/javascript/ahoy_captain/controllers/filter_form_controller.js +0 -13
  109. data/app/assets/javascript/ahoy_captain/controllers/filter_modal_controller.js +0 -45
  110. data/app/assets/javascript/ahoy_captain/controllers/frame_link_controller.js +0 -20
  111. data/app/assets/javascript/ahoy_captain/controllers/interval_controller.js +0 -15
  112. data/app/assets/javascript/ahoy_captain/controllers/line_chart_controller.js +0 -251
  113. data/app/assets/javascript/ahoy_captain/controllers/map_controller.js +0 -47
  114. data/app/assets/javascript/ahoy_captain/controllers/predicate_select_controller.js +0 -10
  115. data/app/assets/javascript/ahoy_captain/controllers/properties_controller.js +0 -8
  116. data/app/assets/javascript/ahoy_captain/controllers/property_filter_controller.js +0 -45
  117. data/app/assets/javascript/ahoy_captain/controllers/tile_controller.js +0 -33
  118. data/app/assets/javascript/ahoy_captain/controllers/toggle_controller.js +0 -17
  119. data/app/assets/javascript/ahoy_captain/helpers/chart_utils.js +0 -156
  120. data/app/assets/javascript/ahoy_captain/helpers/countries.js +0 -2261
  121. data/app/assets/javascript/ahoy_captain/helpers/number_formatters.js +0 -55
  122. data/app/components/ahoy_captain/combobox_component.html.erb +0 -33
  123. data/app/components/ahoy_captain/combobox_component.rb +0 -13
  124. data/app/components/ahoy_captain/comparison_link_component.html.erb +0 -17
  125. data/app/components/ahoy_captain/comparison_link_component.rb +0 -44
  126. data/app/components/ahoy_captain/filter/dropdown_component.html.erb +0 -50
  127. data/app/components/ahoy_captain/filter/dropdown_component.rb +0 -51
  128. data/app/components/ahoy_captain/previous_next_component.html.erb +0 -8
  129. data/app/components/ahoy_captain/previous_next_component.rb +0 -11
  130. data/app/components/ahoy_captain/stats/comparable_container_component.html.erb +0 -25
  131. data/app/components/ahoy_captain/stats/comparable_container_component.rb +0 -86
  132. data/app/components/ahoy_captain/stats/container_component.html.erb +0 -15
  133. data/app/components/ahoy_captain/stats/container_component.rb +0 -26
  134. data/app/components/ahoy_captain/tables/devices_table_component.rb +0 -11
  135. data/app/components/ahoy_captain/tables/dynamic_table.rb +0 -13
  136. data/app/components/ahoy_captain/tables/dynamic_table_component.rb +0 -204
  137. data/app/components/ahoy_captain/tables/goals_table_component.rb +0 -17
  138. data/app/components/ahoy_captain/tables/header_component.html.erb +0 -5
  139. data/app/components/ahoy_captain/tables/header_component.rb +0 -18
  140. data/app/components/ahoy_captain/tables/headers/header_component.html.erb +0 -5
  141. data/app/components/ahoy_captain/tables/headers/header_component.rb +0 -16
  142. data/app/components/ahoy_captain/tables/properties_table_component.rb +0 -27
  143. data/app/components/ahoy_captain/tables/row_component.html.erb +0 -4
  144. data/app/components/ahoy_captain/tables/rows/row_component.html.erb +0 -6
  145. data/app/components/ahoy_captain/tables/rows/row_component.rb +0 -40
  146. data/app/controllers/ahoy_captain/exports_controller.rb +0 -14
  147. data/app/controllers/ahoy_captain/filters/goals_controller.rb +0 -9
  148. data/app/controllers/ahoy_captain/filters/properties/names_controller.rb +0 -11
  149. data/app/controllers/ahoy_captain/filters/properties/values_controller.rb +0 -15
  150. data/app/controllers/ahoy_captain/locations/cities_controller.rb +0 -22
  151. data/app/controllers/ahoy_captain/locations/countries_controller.rb +0 -22
  152. data/app/controllers/ahoy_captain/locations/maps_controller.rb +0 -24
  153. data/app/controllers/ahoy_captain/locations/regions_controller.rb +0 -22
  154. data/app/controllers/ahoy_captain/properties_controller.rb +0 -41
  155. data/app/models/ahoy_captain/comparison_mode.rb +0 -72
  156. data/app/models/ahoy_captain/export.rb +0 -48
  157. data/app/models/ahoy_captain/filter_parser.rb +0 -82
  158. data/app/models/ahoy_captain/range_from_params.rb +0 -78
  159. data/app/models/concerns/ahoy_captain/compare_mode.rb +0 -19
  160. data/app/models/concerns/ahoy_captain/limitable.rb +0 -17
  161. data/app/queries/ahoy_captain/campaign_query.rb +0 -14
  162. data/app/queries/ahoy_captain/city_query.rb +0 -11
  163. data/app/queries/ahoy_captain/country_query.rb +0 -10
  164. data/app/queries/ahoy_captain/device_query.rb +0 -10
  165. data/app/queries/ahoy_captain/region_query.rb +0 -11
  166. data/app/queries/ahoy_captain/source_query.rb +0 -10
  167. data/app/queries/ahoy_captain/stats/base_query.rb +0 -18
  168. data/app/queries/ahoy_captain/top_page_query.rb +0 -13
  169. data/app/queries/concerns/ahoy_captain/comparable_queries.rb +0 -25
  170. data/app/queries/concerns/ahoy_captain/comparable_query.rb +0 -138
  171. data/app/queries/concerns/ahoy_captain/lazy_comparable_query.rb +0 -42
  172. data/app/views/ahoy_captain/devices/_table.html.erb +0 -2
  173. data/app/views/ahoy_captain/layouts/shared/_tile_loader.html.erb +0 -12
  174. data/app/views/ahoy_captain/locations/maps/show.html.erb +0 -3
  175. data/app/views/ahoy_captain/properties/_form.html.erb +0 -6
  176. data/app/views/ahoy_captain/properties/index.html.erb +0 -3
  177. data/app/views/ahoy_captain/properties/show.html.erb +0 -6
  178. data/app/views/ahoy_captain/roots/_filters.html.erb +0 -80
  179. data/lib/ahoy_captain/filter_configuration/filter.rb +0 -16
  180. data/lib/ahoy_captain/filter_configuration/filter_collection.rb +0 -48
  181. data/lib/ahoy_captain/filters_configuration.rb +0 -77
  182. data/lib/ahoy_captain/predicate_label.rb +0 -7
  183. data/lib/generators/ahoy_captain/migration_generator.rb +0 -21
  184. data/lib/generators/ahoy_captain/templates/migration.rb.tt +0 -7
  185. /data/app/views/ahoy_captain/{locations/cities → cities}/index.html+details.erb +0 -0
  186. /data/app/views/ahoy_captain/{locations/cities → cities}/index.html.erb +0 -0
  187. /data/app/views/ahoy_captain/{locations/countries → countries}/index.html+details.erb +0 -0
  188. /data/app/views/ahoy_captain/{locations/countries → countries}/index.html.erb +0 -0
  189. /data/app/views/ahoy_captain/{locations/regions → regions}/index.html+details.erb +0 -0
  190. /data/app/views/ahoy_captain/{locations/regions → regions}/index.html.erb +0 -0
@@ -1,10 +1,9 @@
1
1
  require 'ahoy_captain/period_collection'
2
- require 'ahoy_captain/filters_configuration'
3
2
 
4
3
  module AhoyCaptain
5
4
  class Configuration
6
- attr_accessor :view_name, :theme, :realtime_interval
7
- attr_reader :goals, :funnels, :cache, :ranges, :disabled_widgets, :event, :models, :filters, :predicate_labels
5
+ attr_accessor :view_name, :theme
6
+ attr_reader :goals, :funnels, :cache, :ranges, :disabled_widgets, :event, :models
8
7
  def initialize
9
8
  @goals = GoalCollection.new
10
9
  @funnels = FunnelCollection.new
@@ -15,25 +14,15 @@ module AhoyCaptain
15
14
  option.store = Rails.cache
16
15
  option.ttl = 1.minute
17
16
  end
17
+ @event = ActiveSupport::OrderedOptions.new.tap do |option|
18
+ option.view_name = "$view"
19
+ option.url_column = "CONCAT(properties->>'controller', '#', properties->>'action')"
20
+ option.url_exists = "JSONB_EXISTS(properties, 'controller') AND JSONB_EXISTS(properties, 'action')"
21
+ end
18
22
  @models = ActiveSupport::OrderedOptions.new.tap do |option|
19
23
  option.event = "::Ahoy::Event"
20
24
  option.visit = "::Ahoy::Visit"
21
25
  end
22
- @event = ActiveSupport::OrderedOptions.new.tap do |option|
23
- option.view_name = "$view"
24
- option.url_column = "CONCAT(#{@models.event.parameterize.tableize}.properties->>'controller', '#', #{@models.event.parameterize.tableize}.properties->>'action')"
25
- option.url_exists = "JSONB_EXISTS(#{@models.event.parameterize.tableize}.properties, 'controller') AND JSONB_EXISTS(#{@models.event.parameterize.tableize}.properties, 'action')"
26
- end
27
- @filters = FiltersConfiguration.load_default
28
- @predicate_labels = {
29
- eq: 'equals',
30
- not_eq: 'not equals',
31
- cont: 'contains',
32
- in: 'in',
33
- not_in: 'not in',
34
- }
35
-
36
- @realtime_interval = 30.seconds
37
26
  @disabled_widgets = []
38
27
  end
39
28
 
@@ -6,28 +6,6 @@ require 'view_component'
6
6
  require 'chartkick'
7
7
  require 'groupdate'
8
8
  require 'pagy'
9
- require 'zip'
10
-
11
- module Ransack
12
- module Nodes
13
- class Condition
14
-
15
- # allows for sql from a formatter
16
- # see https://github.com/activerecord-hackery/ransack/issues/702
17
- def casted_array?(predicate)
18
- return unless predicate.is_a?(Arel::Nodes::Casted)
19
-
20
- predicate.value.is_a?(Array)
21
- end
22
-
23
- end
24
- end
25
- end
26
-
27
- Ransack.configure do |config|
28
- config.add_predicate 'json_cont', arel_predicate: 'contains', formatter: proc { |v| JSON.parse(v) }
29
- config.add_predicate 'json_eq', arel_predicate: 'eq', formatter: proc { |v| JSON.parse(v) }
30
- end
31
9
 
32
10
  module AhoyCaptain
33
11
  class Engine < Rails::Engine
@@ -1,31 +1,19 @@
1
1
  module AhoyCaptain
2
2
  class Goal
3
3
  attr_accessor :id
4
- attr_reader :title, :event_query
4
+ attr_reader :title, :event_name
5
5
  def initialize
6
6
  @id = nil
7
7
  @title = nil
8
- @event_query = nil
8
+ @event_name = nil
9
9
  end
10
10
 
11
11
  def label(value)
12
12
  @title = value
13
13
  end
14
14
 
15
- def name(value)
16
- @event_query = -> { ::AhoyCaptain.event.where(name: value) }
17
- end
18
-
19
15
  def event(value)
20
- ActiveSupport::Deprecation.warn(
21
- "event is deprecated. " \
22
- "Use name instead."
23
- )
24
- name(value)
25
- end
26
-
27
- def query(&block)
28
- @event_query = block
16
+ @event_name = value
29
17
  end
30
18
  end
31
19
 
@@ -33,7 +21,7 @@ module AhoyCaptain
33
21
  include Enumerable
34
22
 
35
23
  def initialize
36
- @goals = {}.with_indifferent_access
24
+ @goals = {}
37
25
  end
38
26
 
39
27
  def register(goal)
@@ -51,7 +51,7 @@ module AhoyCaptain
51
51
  }.each do |param, options|
52
52
  instance.add(param, options[:label], options[:range])
53
53
  end
54
- instance.default = :'30d'
54
+ instance.default = :mtd
55
55
  instance
56
56
  end
57
57
 
@@ -1,3 +1,3 @@
1
1
  module AhoyCaptain
2
- VERSION = "0.11.1"
2
+ VERSION = "0.76"
3
3
  end
data/lib/ahoy_captain.rb CHANGED
@@ -4,7 +4,6 @@ require "ahoy_captain/engine"
4
4
  require "ahoy_captain/goals"
5
5
  require "ahoy_captain/funnels"
6
6
  require "ahoy_captain/configuration"
7
- require "ahoy_captain/predicate_label"
8
7
  require 'ahoy_captain/ahoy/visit_methods'
9
8
  require 'ahoy_captain/ahoy/event_methods'
10
9
 
@@ -28,13 +27,11 @@ module AhoyCaptain
28
27
  pin "@hotwired/stimulus", to: "stimulus.min.js", preload: true
29
28
  pin "@hotwired/stimulus-loading", to: "stimulus-loading.js", preload: true
30
29
  pin "application", to: "ahoy_captain/application.js", preload: true
30
+ pin "slim-select", to: "https://ga.jspm.io/npm:slim-select@2.6.0/dist/slimselect.es.js", preload: true
31
31
  pin "chartkick", to: "chartkick.js"
32
32
  pin "Chart.bundle", to: "Chart.bundle.js"
33
33
  pin "chartjs-plugin-datalabels", to: "https://cdn.jsdelivr.net/npm/chartjs-plugin-datalabels@2", preload: true
34
- pin "classnames", to: "https://cdnjs.cloudflare.com/ajax/libs/classnames/2.3.2/index.min.js", preload: true
35
- pin "chartjs-chart-geo", to: "https://unpkg.com/chartjs-chart-geo@4", preload: true
36
34
  pin_all_from AhoyCaptain::Engine.root.join("app/assets/javascript/ahoy_captain/controllers"), under: "controllers", to: "ahoy_captain/controllers"
37
- pin_all_from AhoyCaptain::Engine.root.join("app/assets/javascript/ahoy_captain/helpers"), under: "helpers", to: "ahoy_captain/helpers"
38
35
  end
39
36
  end
40
37
 
@@ -53,9 +50,5 @@ module AhoyCaptain
53
50
  def visit
54
51
  @visit ||= config.models[:visit].constantize
55
52
  end
56
-
57
- def none
58
- @none ||= OpenStruct.new(text: "(none)", value: "!none!")
59
- end
60
53
  end
61
54
  end
@@ -1,4 +1,4 @@
1
- AhoyCaptain.configure do |config|
1
+ AhoyCaptain.configure do
2
2
  # ==> Event tracking
3
3
  #
4
4
  # View name
@@ -74,39 +74,6 @@ AhoyCaptain.configure do |config|
74
74
  #
75
75
  # And handle the default range, which will be used if no range is given:
76
76
  # config.ranges.default = '3d'
77
- #
78
- # The max range if a custom range is sent
79
- # config.ranges.max = 180.days
80
- #
81
- # Set to false to disable custom ranges
82
- # config.ranges.custom = true
83
- #
84
- # For an interval to be considered "realtime" it must not have a secondary item in the range
85
-
86
- # ==> Filters
87
- #
88
- # Defaults come from lib/ahoy_captain/filter_configuration.rb
89
- #
90
- # If you want your own entirely, first call reset.
91
- # config.filters.reset
92
- #
93
- # Then you can add your own.
94
- #
95
- # config.filters.register "Group label" do
96
- # filter label: "Some label", column: :column_name, url: :url_for_options, predicates: [:in, :not_in], multiple: true
97
- # end
98
- #
99
- # You can also remove an existing group:
100
- #
101
- # config.filters.delete("Group label")
102
- #
103
- # Remove a specific filter from a group:
104
- #
105
- # config.filters["Group label"].delete(:column_name)
106
- #
107
- # You can add to an existing group:
108
- #
109
- # config.filters["Group label"].filter label: "Some label", column: :column_name, url: :url_for_options, predicates: [:in, :not_in], multiple: true
110
77
 
111
78
  # ==> Caching
112
79
  # config.cache.enabled = false
@@ -124,23 +91,14 @@ AhoyCaptain.configure do |config|
124
91
  #
125
92
  # config.goal :unique_id do
126
93
  # label "Some label here"
127
- # name "The event name you're tracking in your Ahoy::Event table"
94
+ # event "The event name you're tracking in your Ahoy::Event table"
128
95
  # end
129
96
  #
130
97
  # Real-world example:
131
98
  #
132
99
  # config.goal :appointment_paid do
133
100
  # label "Appointment Paid"
134
- # name "$appointment.paid"
135
- # end
136
- #
137
- # You can also use queries:
138
- #
139
- # config.goal :appointment_paid do
140
- # label "Appointment Paid"
141
- # query do
142
- # ::Ahoy::Event.where(...)
143
- # end
101
+ # event "$appointment.paid"
144
102
  # end
145
103
 
146
104
  # ==> Funnels
@@ -162,9 +120,4 @@ AhoyCaptain.configure do |config|
162
120
  # goal :appointment_created
163
121
  # goal :appointment_paid
164
122
  # end
165
- #
166
- # => Realtime interval
167
- # config.realtime_interval = 30.seconds
168
- #
169
- # How frequently the page should refresh if the interval is realtime
170
123
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ahoy_captain
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.1
4
+ version: '0.76'
5
5
  platform: ruby
6
6
  authors:
7
7
  - joshmn
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-04 00:00:00.000000000 Z
11
+ date: 2023-07-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -150,20 +150,6 @@ dependencies:
150
150
  - - ">="
151
151
  - !ruby/object:Gem::Version
152
152
  version: '4'
153
- - !ruby/object:Gem::Dependency
154
- name: rubyzip
155
- requirement: !ruby/object:Gem::Requirement
156
- requirements:
157
- - - ">="
158
- - !ruby/object:Gem::Version
159
- version: '0'
160
- type: :runtime
161
- prerelease: false
162
- version_requirements: !ruby/object:Gem::Requirement
163
- requirements:
164
- - - ">="
165
- - !ruby/object:Gem::Version
166
- version: '0'
167
153
  - !ruby/object:Gem::Dependency
168
154
  name: rails
169
155
  requirement: !ruby/object:Gem::Requirement
@@ -262,90 +248,6 @@ dependencies:
262
248
  - - ">="
263
249
  - !ruby/object:Gem::Version
264
250
  version: '0'
265
- - !ruby/object:Gem::Dependency
266
- name: factory_bot_rails
267
- requirement: !ruby/object:Gem::Requirement
268
- requirements:
269
- - - ">="
270
- - !ruby/object:Gem::Version
271
- version: '0'
272
- type: :development
273
- prerelease: false
274
- version_requirements: !ruby/object:Gem::Requirement
275
- requirements:
276
- - - ">="
277
- - !ruby/object:Gem::Version
278
- version: '0'
279
- - !ruby/object:Gem::Dependency
280
- name: pry
281
- requirement: !ruby/object:Gem::Requirement
282
- requirements:
283
- - - ">="
284
- - !ruby/object:Gem::Version
285
- version: '0'
286
- type: :development
287
- prerelease: false
288
- version_requirements: !ruby/object:Gem::Requirement
289
- requirements:
290
- - - ">="
291
- - !ruby/object:Gem::Version
292
- version: '0'
293
- - !ruby/object:Gem::Dependency
294
- name: pry-rails
295
- requirement: !ruby/object:Gem::Requirement
296
- requirements:
297
- - - ">="
298
- - !ruby/object:Gem::Version
299
- version: '0'
300
- type: :development
301
- prerelease: false
302
- version_requirements: !ruby/object:Gem::Requirement
303
- requirements:
304
- - - ">="
305
- - !ruby/object:Gem::Version
306
- version: '0'
307
- - !ruby/object:Gem::Dependency
308
- name: rspec-rails
309
- requirement: !ruby/object:Gem::Requirement
310
- requirements:
311
- - - ">="
312
- - !ruby/object:Gem::Version
313
- version: '0'
314
- type: :development
315
- prerelease: false
316
- version_requirements: !ruby/object:Gem::Requirement
317
- requirements:
318
- - - ">="
319
- - !ruby/object:Gem::Version
320
- version: '0'
321
- - !ruby/object:Gem::Dependency
322
- name: simplecov
323
- requirement: !ruby/object:Gem::Requirement
324
- requirements:
325
- - - ">="
326
- - !ruby/object:Gem::Version
327
- version: '0'
328
- type: :development
329
- prerelease: false
330
- version_requirements: !ruby/object:Gem::Requirement
331
- requirements:
332
- - - ">="
333
- - !ruby/object:Gem::Version
334
- version: '0'
335
- - !ruby/object:Gem::Dependency
336
- name: sqlite3
337
- requirement: !ruby/object:Gem::Requirement
338
- requirements:
339
- - - ">="
340
- - !ruby/object:Gem::Version
341
- version: '0'
342
- type: :development
343
- prerelease: false
344
- version_requirements: !ruby/object:Gem::Requirement
345
- requirements:
346
- - - ">="
347
- - !ruby/object:Gem::Version
348
- version: '0'
349
251
  description: A full-featured, mountable analytics dashboard for your Rails app, powered
350
252
  by Ahoy.
351
253
  email:
@@ -364,38 +266,20 @@ files:
364
266
  - app/assets/javascript/ahoy_captain/application.js
365
267
  - app/assets/javascript/ahoy_captain/controllers/application.js
366
268
  - app/assets/javascript/ahoy_captain/controllers/application_controller.js
367
- - app/assets/javascript/ahoy_captain/controllers/combobox_controller.js
368
269
  - app/assets/javascript/ahoy_captain/controllers/details_modal_controller.js
369
270
  - app/assets/javascript/ahoy_captain/controllers/dropdown_label_controller.js
370
- - app/assets/javascript/ahoy_captain/controllers/filter/item_controller.js
371
- - app/assets/javascript/ahoy_captain/controllers/filter_form_controller.js
372
- - app/assets/javascript/ahoy_captain/controllers/filter_modal_controller.js
373
- - app/assets/javascript/ahoy_captain/controllers/frame_link_controller.js
271
+ - app/assets/javascript/ahoy_captain/controllers/filter_controller.js
272
+ - app/assets/javascript/ahoy_captain/controllers/filter_tag_controller.js
374
273
  - app/assets/javascript/ahoy_captain/controllers/funnel_chart_controller.js
375
274
  - app/assets/javascript/ahoy_captain/controllers/index.js
376
- - app/assets/javascript/ahoy_captain/controllers/interval_controller.js
377
- - app/assets/javascript/ahoy_captain/controllers/line_chart_controller.js
378
- - app/assets/javascript/ahoy_captain/controllers/map_controller.js
379
- - app/assets/javascript/ahoy_captain/controllers/predicate_select_controller.js
380
- - app/assets/javascript/ahoy_captain/controllers/properties_controller.js
381
- - app/assets/javascript/ahoy_captain/controllers/property_filter_controller.js
275
+ - app/assets/javascript/ahoy_captain/controllers/link_controller.js
276
+ - app/assets/javascript/ahoy_captain/controllers/navigation_controller.js
382
277
  - app/assets/javascript/ahoy_captain/controllers/realtime_controller.js
383
- - app/assets/javascript/ahoy_captain/controllers/tile_controller.js
384
- - app/assets/javascript/ahoy_captain/controllers/toggle_controller.js
385
- - app/assets/javascript/ahoy_captain/helpers/chart_utils.js
386
- - app/assets/javascript/ahoy_captain/helpers/countries.js
387
- - app/assets/javascript/ahoy_captain/helpers/number_formatters.js
388
278
  - app/assets/manifest/ahoy_captain/manifest.js
389
- - app/components/ahoy_captain/combobox_component.html.erb
390
- - app/components/ahoy_captain/combobox_component.rb
391
- - app/components/ahoy_captain/comparison_link_component.html.erb
392
- - app/components/ahoy_captain/comparison_link_component.rb
393
279
  - app/components/ahoy_captain/dropdown_button_component.html.erb
394
280
  - app/components/ahoy_captain/dropdown_button_component.rb
395
281
  - app/components/ahoy_captain/dropdown_link_component.html.erb
396
282
  - app/components/ahoy_captain/dropdown_link_component.rb
397
- - app/components/ahoy_captain/filter/dropdown_component.html.erb
398
- - app/components/ahoy_captain/filter/dropdown_component.rb
399
283
  - app/components/ahoy_captain/filter/modal_component.html.erb
400
284
  - app/components/ahoy_captain/filter/modal_component.rb
401
285
  - app/components/ahoy_captain/filter/select_component.html.erb
@@ -404,59 +288,35 @@ files:
404
288
  - app/components/ahoy_captain/filter/tag_component.rb
405
289
  - app/components/ahoy_captain/filter/tag_container_component.html.erb
406
290
  - app/components/ahoy_captain/filter/tag_container_component.rb
407
- - app/components/ahoy_captain/previous_next_component.html.erb
408
- - app/components/ahoy_captain/previous_next_component.rb
409
- - app/components/ahoy_captain/stats/comparable_container_component.html.erb
410
- - app/components/ahoy_captain/stats/comparable_container_component.rb
411
- - app/components/ahoy_captain/stats/container_component.html.erb
412
- - app/components/ahoy_captain/stats/container_component.rb
413
291
  - app/components/ahoy_captain/sticky_nav_component.html.erb
414
292
  - app/components/ahoy_captain/sticky_nav_component.rb
415
293
  - app/components/ahoy_captain/table_component.html.erb
416
294
  - app/components/ahoy_captain/table_component.rb
417
- - app/components/ahoy_captain/tables/devices_table_component.rb
418
- - app/components/ahoy_captain/tables/dynamic_table.rb
419
- - app/components/ahoy_captain/tables/dynamic_table_component.rb
420
- - app/components/ahoy_captain/tables/goals_table_component.rb
421
- - app/components/ahoy_captain/tables/header_component.html.erb
422
- - app/components/ahoy_captain/tables/header_component.rb
423
- - app/components/ahoy_captain/tables/headers/header_component.html.erb
424
- - app/components/ahoy_captain/tables/headers/header_component.rb
425
- - app/components/ahoy_captain/tables/properties_table_component.rb
426
- - app/components/ahoy_captain/tables/row_component.html.erb
427
- - app/components/ahoy_captain/tables/rows/row_component.html.erb
428
- - app/components/ahoy_captain/tables/rows/row_component.rb
429
295
  - app/components/ahoy_captain/tile_component.html.erb
430
296
  - app/components/ahoy_captain/tile_component.rb
431
297
  - app/components/ahoy_captain/tooltip_component.html.erb
432
298
  - app/components/ahoy_captain/tooltip_component.rb
433
299
  - app/controllers/ahoy_captain/application_controller.rb
434
300
  - app/controllers/ahoy_captain/campaigns_controller.rb
301
+ - app/controllers/ahoy_captain/cities_controller.rb
302
+ - app/controllers/ahoy_captain/countries_controller.rb
435
303
  - app/controllers/ahoy_captain/devices_controller.rb
436
304
  - app/controllers/ahoy_captain/entry_pages_controller.rb
437
305
  - app/controllers/ahoy_captain/exit_pages_controller.rb
438
- - app/controllers/ahoy_captain/exports_controller.rb
439
306
  - app/controllers/ahoy_captain/filters/base_controller.rb
440
- - app/controllers/ahoy_captain/filters/goals_controller.rb
441
307
  - app/controllers/ahoy_captain/filters/locations_controller.rb
442
308
  - app/controllers/ahoy_captain/filters/operating_systems/names_controller.rb
443
309
  - app/controllers/ahoy_captain/filters/operating_systems/versions_controller.rb
444
310
  - app/controllers/ahoy_captain/filters/pages/actions_controller.rb
445
311
  - app/controllers/ahoy_captain/filters/pages/entry_pages_controller.rb
446
312
  - app/controllers/ahoy_captain/filters/pages/exit_pages_controller.rb
447
- - app/controllers/ahoy_captain/filters/properties/names_controller.rb
448
- - app/controllers/ahoy_captain/filters/properties/values_controller.rb
449
313
  - app/controllers/ahoy_captain/filters/screens_controller.rb
450
314
  - app/controllers/ahoy_captain/filters/sources_controller.rb
451
315
  - app/controllers/ahoy_captain/filters/utms_controller.rb
452
316
  - app/controllers/ahoy_captain/funnels_controller.rb
453
317
  - app/controllers/ahoy_captain/goals_controller.rb
454
- - app/controllers/ahoy_captain/locations/cities_controller.rb
455
- - app/controllers/ahoy_captain/locations/countries_controller.rb
456
- - app/controllers/ahoy_captain/locations/maps_controller.rb
457
- - app/controllers/ahoy_captain/locations/regions_controller.rb
458
- - app/controllers/ahoy_captain/properties_controller.rb
459
318
  - app/controllers/ahoy_captain/realtimes_controller.rb
319
+ - app/controllers/ahoy_captain/regions_controller.rb
460
320
  - app/controllers/ahoy_captain/roots_controller.rb
461
321
  - app/controllers/ahoy_captain/sources_controller.rb
462
322
  - app/controllers/ahoy_captain/stats/base_controller.rb
@@ -480,45 +340,33 @@ files:
480
340
  - app/decorators/ahoy_captain/source_decorator.rb
481
341
  - app/decorators/ahoy_captain/top_page_decorator.rb
482
342
  - app/helpers/ahoy_captain/application_helper.rb
483
- - app/models/ahoy_captain/comparison_mode.rb
484
- - app/models/ahoy_captain/export.rb
485
- - app/models/ahoy_captain/filter_parser.rb
486
- - app/models/ahoy_captain/range_from_params.rb
343
+ - app/models/ahoy_captain/current.rb
487
344
  - app/models/ahoy_captain/rangeable.rb
345
+ - app/models/ahoy_captain/url_helpers.rb
488
346
  - app/models/ahoy_captain/widget.rb
489
- - app/models/concerns/ahoy_captain/compare_mode.rb
490
- - app/models/concerns/ahoy_captain/limitable.rb
491
347
  - app/models/concerns/ahoy_captain/range_options.rb
492
348
  - app/presenters/ahoy_captain/dashboard_presenter.rb
493
349
  - app/presenters/ahoy_captain/funnel_presenter.rb
494
350
  - app/presenters/ahoy_captain/goals_presenter.rb
495
351
  - app/queries/ahoy_captain/application_query.rb
496
- - app/queries/ahoy_captain/campaign_query.rb
497
- - app/queries/ahoy_captain/city_query.rb
498
- - app/queries/ahoy_captain/country_query.rb
499
- - app/queries/ahoy_captain/device_query.rb
500
352
  - app/queries/ahoy_captain/entry_pages_query.rb
501
353
  - app/queries/ahoy_captain/event_query.rb
502
354
  - app/queries/ahoy_captain/exit_pages_query.rb
503
- - app/queries/ahoy_captain/region_query.rb
504
- - app/queries/ahoy_captain/source_query.rb
505
355
  - app/queries/ahoy_captain/stats/average_views_per_visit_query.rb
506
356
  - app/queries/ahoy_captain/stats/average_visit_duration_query.rb
507
- - app/queries/ahoy_captain/stats/base_query.rb
508
357
  - app/queries/ahoy_captain/stats/bounce_rates_query.rb
509
358
  - app/queries/ahoy_captain/stats/total_pageviews_query.rb
510
359
  - app/queries/ahoy_captain/stats/total_visitors_query.rb
511
360
  - app/queries/ahoy_captain/stats/unique_visitors_query.rb
512
361
  - app/queries/ahoy_captain/stats/views_per_visit_query.rb
513
362
  - app/queries/ahoy_captain/stats/visit_duration_query.rb
514
- - app/queries/ahoy_captain/top_page_query.rb
515
363
  - app/queries/ahoy_captain/visit_query.rb
516
- - app/queries/concerns/ahoy_captain/comparable_queries.rb
517
- - app/queries/concerns/ahoy_captain/comparable_query.rb
518
- - app/queries/concerns/ahoy_captain/lazy_comparable_query.rb
519
364
  - app/views/ahoy_captain/campaigns/index.html+details.erb
520
365
  - app/views/ahoy_captain/campaigns/index.html.erb
521
- - app/views/ahoy_captain/devices/_table.html.erb
366
+ - app/views/ahoy_captain/cities/index.html+details.erb
367
+ - app/views/ahoy_captain/cities/index.html.erb
368
+ - app/views/ahoy_captain/countries/index.html+details.erb
369
+ - app/views/ahoy_captain/countries/index.html.erb
522
370
  - app/views/ahoy_captain/devices/index.html+details.erb
523
371
  - app/views/ahoy_captain/devices/index.html.erb
524
372
  - app/views/ahoy_captain/entry_pages/index.html+details.erb
@@ -529,19 +377,9 @@ files:
529
377
  - app/views/ahoy_captain/funnels/show.html.erb
530
378
  - app/views/ahoy_captain/goals/index.html.erb
531
379
  - app/views/ahoy_captain/layouts/application.html.erb
532
- - app/views/ahoy_captain/layouts/shared/_tile_loader.html.erb
533
- - app/views/ahoy_captain/locations/cities/index.html+details.erb
534
- - app/views/ahoy_captain/locations/cities/index.html.erb
535
- - app/views/ahoy_captain/locations/countries/index.html+details.erb
536
- - app/views/ahoy_captain/locations/countries/index.html.erb
537
- - app/views/ahoy_captain/locations/maps/show.html.erb
538
- - app/views/ahoy_captain/locations/regions/index.html+details.erb
539
- - app/views/ahoy_captain/locations/regions/index.html.erb
540
- - app/views/ahoy_captain/properties/_form.html.erb
541
- - app/views/ahoy_captain/properties/index.html.erb
542
- - app/views/ahoy_captain/properties/show.html.erb
543
380
  - app/views/ahoy_captain/realtimes/show.html.erb
544
- - app/views/ahoy_captain/roots/_filters.html.erb
381
+ - app/views/ahoy_captain/regions/index.html+details.erb
382
+ - app/views/ahoy_captain/regions/index.html.erb
545
383
  - app/views/ahoy_captain/roots/show.html.erb
546
384
  - app/views/ahoy_captain/sources/index.html+details.erb
547
385
  - app/views/ahoy_captain/sources/index.html.erb
@@ -556,19 +394,13 @@ files:
556
394
  - lib/ahoy_captain/ahoy/visit_methods.rb
557
395
  - lib/ahoy_captain/configuration.rb
558
396
  - lib/ahoy_captain/engine.rb
559
- - lib/ahoy_captain/filter_configuration/filter.rb
560
- - lib/ahoy_captain/filter_configuration/filter_collection.rb
561
- - lib/ahoy_captain/filters_configuration.rb
562
397
  - lib/ahoy_captain/funnels.rb
563
398
  - lib/ahoy_captain/goals.rb
564
399
  - lib/ahoy_captain/period_collection.rb
565
- - lib/ahoy_captain/predicate_label.rb
566
400
  - lib/ahoy_captain/railtie.rb
567
401
  - lib/ahoy_captain/version.rb
568
402
  - lib/generators/ahoy_captain/install_generator.rb
569
- - lib/generators/ahoy_captain/migration_generator.rb
570
403
  - lib/generators/ahoy_captain/templates/config.rb.tt
571
- - lib/generators/ahoy_captain/templates/migration.rb.tt
572
404
  homepage:
573
405
  licenses:
574
406
  - MIT