Currently I'm using rails 5 and have been looking for a method of implementing google analytics in my application with turbolinks. Every site I go to says something different, and I've gone through loads of SO questions and none of them seem to work or are outdated.
Here's a shorter list of the methods I've tried:
http://nithinbekal.com/posts/turbolinks-google-analytics/
Rails 4 turbolinks with Google Analytics
http://railsapps.github.io/rails-google-analytics.html
I really thought that last one was gonna be most promising ¯\_(ツ)_/¯
So my question is what is the most updated method of integrating google analytics into a rails application?