Sha256: f04ea5cbc9cb6267376a2b020c008f4779b47b62c16b97d76b01ba019d28e4ab
Contents?: true
Size: 1.01 KB
Versions: 34
Compression:
Stored size: 1.01 KB
Contents
module Workarea module Storefront class AnalyticsController < ActionController::Metal include ActionController::Instrumentation def category_view unless robot? Metrics::CategoryByDay.inc(key: { category_id: params[:category_id] }, views: 1) end end def product_view unless robot? Metrics::ProductByDay.inc(key: { product_id: params[:product_id] }, views: 1) end end def search unless robot? Metrics::SearchByDay.save_search(params[:q], params[:total_results]) end end def search_abandonment warn <<~eos DEPRECATION WARNING: Search abandonment tracking is deprecated and will be removed \ in Workarea 3.5. eos end def filters warn <<~eos DEPRECATION WARNING: Filter analytics tracking is deprecated and will be removed \ in Workarea 3.5. eos end private def robot? Robots.is_robot?(request.user_agent) end end end end
Version data entries
34 entries across 34 versions & 1 rubygems