How to track page views or analytics on partials for Ruby on Rails?
How do people track page views or analytics for partials in Ruby on Rails? For instance, we have a form rendered in a partial, but we would like to track and analyze user behavior relating to the form.
We use Google Analytics. As far as we know, we're not supposed to embed Google Analytics code in the partial view, or it compromises the data.
We started using Mixpanel, but it begins charging after 25,000 data points. We're looking for a free solution to what should be开发者_如何学运维 a pretty basic problem.
You can use google analytics event tracking. you can define a event for each partial and they will track them fine without messing with the automatic page tracking.
google code link for events
personally I found mixpanel rather lacking and expensive when I tried it for work.
精彩评论