Class: Workarea::Api::Storefront::AnalyticsController
- Inherits:
-
ActionController::Metal
- Object
- ActionController::Metal
- Workarea::Api::Storefront::AnalyticsController
- Includes:
- ActionController::Head, ActionController::Instrumentation
- Defined in:
- app/controllers/workarea/api/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
8 9 10 11 |
# File 'app/controllers/workarea/api/storefront/analytics_controller.rb', line 8 def category_view Metrics::CategoryByDay.inc(key: { category_id: params[:category_id] }, views: 1) head :ok end |
#filters ⇒ Object
31 32 33 34 35 36 37 |
# File 'app/controllers/workarea/api/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 eos\n head :ok\nend\n" |
#product_view ⇒ Object
13 14 15 16 |
# File 'app/controllers/workarea/api/storefront/analytics_controller.rb', line 13 def product_view Metrics::ProductByDay.inc(key: { product_id: params[:product_id] }, views: 1) head :ok end |
#search ⇒ Object
18 19 20 21 |
# File 'app/controllers/workarea/api/storefront/analytics_controller.rb', line 18 def search Metrics::SearchByDay.save_search(params[:q], params[:total_results]) head :ok end |
#search_abandonment ⇒ Object
23 24 25 26 27 28 29 |
# File 'app/controllers/workarea/api/storefront/analytics_controller.rb', line 23 def search_abandonment warn "DEPRECATION WARNING: Search abandonment tracking is deprecated and will be removed \\\nin Workarea 3.5.\n eos\n head :ok\nend\n" |