Topic: Google Analytics and Rails

How can I add the google analytics code to my rail application? Thank you in advance!

Re: Google Analytics and Rails

put it towads the bottom of your layout file before the closing body tag, done.

Re: Google Analytics and Rails

Like the above poster says, Google Analytics is javascript, and as such will live in your view.

Google recommends placing the code before the closing tag, on all pages throughout your site that you want analytics for. So ideally in application.html.erb.