Add Google Analytics

This commit is contained in:
Erik Michaels-Ober 2011-05-07 19:03:45 -07:00
parent 5d41efb09f
commit 112b165625
2 changed files with 11 additions and 0 deletions

View File

@ -8,6 +8,7 @@
<%= javascript_include_tag "https://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js" %>
<%= javascript_include_tag "https://github.com/scottschiller/Snowstorm/raw/master/snowstorm-min.js" %>
<%= javascript_include_tag "main" %>
<%= javascript_include_tag "analytics" %>
<%= csrf_meta_tag %>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
</head>

View File

@ -0,0 +1,10 @@
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-23196323-1']);
_gaq.push(['_setDomainName', '.adoptahydrant.org']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();