Plugins - Google Analytics
Add to favoritesThis plugin will automagically add Google Analytics code to all of your pages, instead of manually having to add it to app/views/application.rhtml. You put your tracker id in config/environment.rb and it Just Works. It will, by default, only work in production mode, and you can switch it off for particular controllers and actions.
http://woss.name/2006/05/09/google-analytics-plugin/
http://svn.rubaidh.com/plugins/trunk/google_analytics
Rails' (MIT)
Statistics and Logs


Google has updated its tracking code, this plugin should be updated to use the newer code.
I've used it a couple times, and while you could swap it out with a simple if production then show line, it does allow you to centralize where your account information goes.