google analytics

This commit is contained in:
Adam Wiggins
2012-03-21 09:23:34 -07:00
parent 338c3b2362
commit ed44dcc6b7
+14
View File
@@ -15,6 +15,20 @@
<script type="text/javascript" src="http://use.typekit.com/rsq7tro.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
<% if ENV['GOOGLE_ANALYTICS_KEY'] %>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', '<%= ENV['GOOGLE_ANALYTICS_KEY'] %>']);
_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);
})();
</script>
<% end %>
</head>
<body>
<header>