Module: Gricer::TrackHelper
- Defined in:
- lib/gricer/action_controller/track.rb
Overview
Helper Method to include Javascript code to capture extra values like screen size
Instance Method Summary collapse
-
#gricer_track_tag ⇒ Object
Include Gricer’s Javascript code to track values like screen size.
Instance Method Details
#gricer_track_tag ⇒ Object
Include Gricer’s Javascript code to track values like screen size.
You should include this at the end of your layout file. For pages matching the Gricer::Config.exclude_paths expression, nothing will be added to your page.
84 85 86 87 88 |
# File 'lib/gricer/action_controller/track.rb', line 84 def gricer_track_tag if gricer_request and defined?(gricer_capture_path) content_tag :script, "jQuery(function($) {$.post('#{gricer_capture_path(gricer_request.id)}', Gricer.prepareValues());});", type: 'text/javascript' end end |