Browse files

added Google Analytics snippet

  • Loading branch information...
1 parent 73f7aee commit e56e92904bdd137edde4e24a805a0f86a171ced5 @rockdog committed Apr 10, 2012
Showing with 11 additions and 0 deletions.
  1. +11 −0 views/layout.haml
View
11 views/layout.haml
@@ -51,6 +51,17 @@
.footer
Copyright © #{Time.now.year} by arnunestattoos.com
+ - if Sinatra::Base.production?
+ :javascript
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', 'UA-30749045-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{src: '/js/vendor/jquery-1.7.2.min.js', type: 'text/javascript'}
%script{src: '/js/vendor/jquery.fancybox-2.0.5.min.js', type: 'text/javascript'}
%script{src: '/js/vendor/jquery.history-1.7.1.min.js', type: 'text/javascript'}

0 comments on commit e56e929

Please sign in to comment.