Module: TrueandcoAnalytics::Site::TrueandcoAnalyticsHelper

Defined in:
lib/trueandco_analytics/site/helpers/trueandco_analytics_helper.rb

Instance Method Summary collapse

Instance Method Details

#track_user_behaviorObject



2
3
4
5
6
7
# File 'lib/trueandco_analytics/site/helpers/trueandco_analytics_helper.rb', line 2

def track_user_behavior
  return unless @user_behavior.nil?
  @user_behavior = 1
  js_string = TrueandcoAnalytics.js_track("#{try(:form_authenticity_token)}")
  javascript_tag js_string, defer: 'defer'
end