Google Analytics is used by the vast majority of the internet to monitor and gauge traffic. You can quickly and easily add Google Analytics to your Rails application, however there are a few things you should pay attention to. First, make sure that the Analytics code only loads up in a production environment. It's best to do this by first creating a partial called google_analytics and placing the following code inside of it:

app/views/layouts/_google_analytics.html.erb:

<% if Rails.env == "production"  %>
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-00000000-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
<% end %>

This code will tell Rails to only include the Analytics code in a production environment.

Another good idea is to make sure the people in your company isn't counted in Analytics. To do this you need to obtain a list of the IP addresses that your company uses from your system administrator. Once you have that list, go to the Admin section in Analytics and Click 'All Filters' under the Account section on the left, Click New Filter, Choose 'Traffic from the ip addresses' from the drop down, and enter the ip address you wish to exclude. Repeat this for each ip address your company has. This will filter out your company's traffic and only show you the actual visitors that visit your site.