- Integrate Ahoy gem for tracking user events and visits - Create models for Ahoy events and visits - Implement admin interfaces for managing events and visits - Add background job for cleaning up old analytics data - Update application controller and other relevant controllers to track specific actions This commit implements a comprehensive event tracking system that logs user interactions within the application. Additionally, it includes mechanisms for managing and cleaning historical visit and event data, ensuring efficient data handling.
34 lines
783 B
Ruby
34 lines
783 B
Ruby
ActiveAdmin.register Ahoy::Event do
|
|
|
|
# See permitted parameters documentation:
|
|
# https://github.com/activeadmin/activeadmin/blob/master/docs/2-resource-customization.md#setting-up-strong-parameters
|
|
#
|
|
# Uncomment all parameters which should be permitted for assignment
|
|
#
|
|
# permit_params :visit_id, :user_id, :name, :properties, :time
|
|
#
|
|
# or
|
|
#
|
|
# permit_params do
|
|
# permitted = [:visit_id, :user_id, :name, :properties, :time]
|
|
# permitted << :other if params[:action] == 'create' && current_user.admin?
|
|
# permitted
|
|
# end
|
|
menu priority: 101, label: "事件统计"
|
|
|
|
actions :index
|
|
|
|
index do
|
|
column :id
|
|
column :name
|
|
column :time
|
|
column :properties
|
|
column :user_id
|
|
end
|
|
|
|
filter :name
|
|
filter :time
|
|
filter :properties
|
|
|
|
end
|