Module: Analyze::Tracker

Defined in:
lib/analyze/tracker.rb

Instance Method Summary collapse

Instance Method Details

#current_user_idObject



14
15
16
# File 'lib/analyze/tracker.rb', line 14

def current_user_id
  nil
end

#track_user_visitObject



4
5
6
7
8
9
10
11
12
# File 'lib/analyze/tracker.rb', line 4

def track_user_visit()
  params_to_track = params.except(:controller, :action)
  Analyze::UserVisit.create!(user_id: current_user_id,
    params: params_to_track,
    referrer_url: request.params['HTTP_REFERRER'],
    url: request.url,
    )

end