Permalink
Browse files

adding google analytics.

  • Loading branch information...
1 parent 6a2fe5c commit 21cb9db6a2fe252e4975eae31756585f55a6a791 @rcreasey committed Nov 28, 2011
Showing with 11 additions and 2 deletions.
  1. +1 −1 app/views/errors/404.html.haml
  2. +1 −1 app/views/layouts/application.html.haml
  3. +9 −0 public/javascripts/google.js
@@ -3,7 +3,7 @@
%head
%title kaneda.net
= stylesheet_link_tag 'application'
- = javascript_include_tag 'jquery', 'jtypewriter', 'application'
+ = javascript_include_tag 'jquery', 'jtypewriter', 'application', 'google'
%body
%div.prompt#1{:style => 'display: none'}
@@ -3,6 +3,6 @@
%head
%title kaneda.net
= stylesheet_link_tag 'application'
- = javascript_include_tag 'jquery', 'jtypewriter', 'application'
+ = javascript_include_tag 'jquery', 'jtypewriter', 'application', 'google'
%body= yield
@@ -0,0 +1,9 @@
+var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', 'UA-27281443-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);
+ })();

0 comments on commit 21cb9db

Please sign in to comment.