From 82f3ae27600808fe1d03fb54795c3df46056ea14 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Sat, 24 Dec 2011 19:16:54 +0000 Subject: [PATCH] updated google analytics code --- views/ga.coffee | 5 +---- views/layout.coffee | 4 +--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/views/ga.coffee b/views/ga.coffee index 54b135d..5671689 100644 --- a/views/ga.coffee +++ b/views/ga.coffee @@ -1,6 +1,3 @@ script ''' - var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); -''' -script ''' - try {var pageTracker = _gat._getTracker("UA-354018-12");pageTracker._trackPageview();} catch(err) {} + var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-354018-12']); _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); })(); ''' \ No newline at end of file diff --git a/views/layout.coffee b/views/layout.coffee index d2e2674..ddd76fe 100644 --- a/views/layout.coffee +++ b/views/layout.coffee @@ -2,10 +2,8 @@ doctype 5 html -> head -> meta charset: 'utf-8' - title 'heartb.it' link rel: 'stylesheet', href: 'css/style.css' - + partial 'ga' body -> @body - partial 'ga'