Added Google Analytics code
authorMike Cardwell <github@grepular.com>
Wed, 6 Oct 2010 21:35:09 +0000 (22:35 +0100)
committerMike Cardwell <github@grepular.com>
Wed, 6 Oct 2010 21:35:09 +0000 (22:35 +0100)
templates/web/common.js

index 2ea4d9a486f6ddadbd1cb787cc3cdcea45005d43..3aef463747c7e103f0e021b2c48e9d647fd176da 100644 (file)
@@ -114,3 +114,12 @@ if (document.location.href.match(/^https?:\/\/([^\/]+\.)*exim\.org\//)) {
         if (jump(document.location.href.replace(/^.*#(.+)$/, '$1'))) e.preventDefault();
     });
 })(jQuery);
+
+// Google Analytics
+(function($){
+    window._gaq = [
+        ['_setAccount', 'UA-18951566-1'],
+        ['_trackPageview']
+    ];
+    $.getScript((document.location.protocol === 'https:' ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js');
+})(jQuery);