Skip to content
Browse files

start Analytics

  • Loading branch information...
1 parent 1b3e427 commit 87fe71dd95c7f577bd0c7eb650f4a8f22faddeaa @mislav committed Dec 27, 2010
Showing with 12 additions and 0 deletions.
  1. +12 −0 app.rb
View
12 app.rb
@@ -199,6 +199,18 @@ def root_path?
= yield
+- if settings.production?
+ :javascript
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', 'UA-87067-8']);
+ _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);
+ })();
+
@@ index
%header
%h1

0 comments on commit 87fe71d

Please sign in to comment.
Something went wrong with that request. Please try again.