Permalink
Browse files

Added google analytics

Setup the analytics code and added the js to the template layout.
  • Loading branch information...
1 parent d2a527c commit 17e0228d5ceb471e677a0c33fa0ad392741dda57 @kcalmes kcalmes committed Nov 18, 2011
Showing with 14 additions and 0 deletions.
  1. +14 −0 app/views/layouts/application.html.erb
@@ -26,6 +26,20 @@
<% end %>
<%= csrf_meta_tag %>
+
+ <script type="text/javascript">
+
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', 'UA-27027970-1']);
+ _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>
</head>
<body orient="portrait" style="min-height: 420px; min-width: 320px;">
<div id="wrapper">

0 comments on commit 17e0228

Please sign in to comment.