views:

66

answers:

1

I want to implement this new method of Google Analytics, I want to conditinally insert this code in the head section conditionally in production mode only, any suggestion to how to do this?

http://code.google.com/apis/analytics/docs/tracking/asyncTracking.html

+3  A: 

Are you using Rails 2.3 ? You could wrap the snip in an if statement,

<% if Rails.env.production? %>
    <!-- my analytics code -->
<% end %>

simple enough.

Derek P.