google analytics for rails production environment
April 25th, 2008 • Uncategorized
# assuming a partial located in views/shared # that contains the google analytics script body def render_google_analytics_script render :partial => "/shared/google_analytics" if Rails.env == "production" end # render from layouts <%= render_google_analytics_script %>