title: Tracking users' clicks and page visits in Rails
body: <p>I would like to monitor users' page visits and clicks in my Rails app to make recommendations. My questions are:</p>
  
  <ul>
  <li>Is there a Rails gem for this, or Google Analytics is the standard? If latter is true, then how should I link a page visit to a particular user profile?</li>
  <li>It is typical in Rails to have a  section in application.html.erb, which is shared for all pages. If I add Google Analytics pageview tracking code to  in application.html.erb, will it be able to track all individual pages?</li>
  </ul>