I am having a bit of difficulty implementing google analytics to my rails 4 project. I included the tracking code to the bottom of my layouts file and have even tried to rem
Here is code without using coffeescript:
app/assets/javascripts/analytics.js $(document).on('page:change', function() { if (window._gaq != null) { return _gaq.push(['_trackPageview']); } else if (window.pageTracker != null) { return pageTracker._trackPageview(); } });