Skip to content

Instantly share code, notes, and snippets.

@c3mediagroup
Created April 28, 2009 13:21
Show Gist options
  • Save c3mediagroup/103143 to your computer and use it in GitHub Desktop.
Save c3mediagroup/103143 to your computer and use it in GitHub Desktop.
- if RAILS_ENV == "production"
%script{ :type => "text/javascript" }
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
%script{ :type => "text/javascript" }
var pageTracker = _gat._getTracker("UA-3794127-4");
pageTracker._trackPageview();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment