Closed fascox closed 9 years ago
no, this is not supported. please migrate to Rack::Tracker where i just made the needed changes to make it work with turbolinks. (please checkout master, its not released yet)
config.middleware.use Rack::Tracker do
handler Rack::Tracker::GoogleAnalytics, tracker: 'UA-YYYZZZZ-1', position: :body
end
you need to specify the position
- option, so the GA snippit isn't rendered in the head, what would be the default.
@kangguru Many thanks for pointing us to Rack::Tracker, it works with turbolinks! Just for the info, let me update your snippet according to the current Rack::Tracker docs:
config.middleware.use(Rack::Tracker) do
handler :google_analytics, { tracker: 'UA-YYYZZZZ-1', position: :body }
end
@kelso cool, glad to here that!
both snippits should (hopefully) do the same, although, the one you posted is more elegant.
but, there is actually an issue with turbolinks railslove/rack-tracker#26 if you could check that out, i'd be very grateful, as i don't have a turbolinks app at hand right now.
have issue with this gem and turbo links. Realtime page view are not tracked following links on website. It will track only on page refresh. It si compatible with turbo links enabled?
Rails 4.1