Class: Workarea::Storefront::AnalyticsController
- Inherits:
-
ActionController::Metal
- Object
- ActionController::Metal
- Workarea::Storefront::AnalyticsController
- Includes:
- ActionController::Instrumentation
- Defined in:
- app/controllers/workarea/storefront/analytics_controller.rb
Instance Method Summary collapse
- #category_view ⇒ Object
- #filters ⇒ Object
- #product_view ⇒ Object
- #search ⇒ Object
- #search_abandonment ⇒ Object
Instance Method Details
#category_view ⇒ Object
6 7 8 9 10 |
# File 'app/controllers/workarea/storefront/analytics_controller.rb', line 6 def category_view unless robot? Metrics::CategoryByDay.inc(key: { category_id: params[:category_id] }, views: 1) end end |
#filters ⇒ Object
31 32 33 34 35 36 |
# File 'app/controllers/workarea/storefront/analytics_controller.rb', line 31 def filters warn "DEPRECATION WARNING: Filter analytics tracking is deprecated and will be removed \\\nin Workarea 3.5.\n" end |
#product_view ⇒ Object
12 13 14 15 16 |
# File 'app/controllers/workarea/storefront/analytics_controller.rb', line 12 def product_view unless robot? Metrics::ProductByDay.inc(key: { product_id: params[:product_id] }, views: 1) end end |
#search ⇒ Object
18 19 20 21 22 |
# File 'app/controllers/workarea/storefront/analytics_controller.rb', line 18 def search unless robot? Metrics::SearchByDay.save_search(params[:q], params[:total_results]) end end |
#search_abandonment ⇒ Object
24 25 26 27 28 29 |
# File 'app/controllers/workarea/storefront/analytics_controller.rb', line 24 def search_abandonment warn "DEPRECATION WARNING: Search abandonment tracking is deprecated and will be removed \\\nin Workarea 3.5.\n" end |