From c0ed065400f58400b5641d5b0d9d96ed1ceab51e Mon Sep 17 00:00:00 2001 From: Ariejan de Vroom Date: Sun, 24 Mar 2013 17:12:09 +0100 Subject: [PATCH] Add analytics --- layouts/default.haml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/layouts/default.haml b/layouts/default.haml index 9556918..77f461b 100644 --- a/layouts/default.haml +++ b/layouts/default.haml @@ -86,3 +86,13 @@ %span ariejan.net © 1999 - #{Time.now.year} Ariejan de Vroom / __________________________________________________ Finish Footer %script{:src => "/js/plugins.js", :type => "text/javascript"} + :javascript + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-60089-16']); + _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); + })();