Skip to content

Commit

Permalink
Added analytics code to the site.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoglan committed Jan 4, 2008
1 parent e23a6f9 commit 2bce7db
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion site/src/layouts/application.haml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,15 @@
=link 'Singletons', '/singletons.html'
#footer
:textile
@JS.Class@, © 2007--2008 James Coglan. Released under an MIT-style license.
@JS.Class@, © 2007--2008 James Coglan. Released under an MIT-style license.
%script{:type => 'text/javascript'}
:plain
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{:type => 'text/javascript'}
:plain
if (!/^http:\/\/localhost[\:\/]/i.test(window.location.href)) {
var pageTracker = _gat._getTracker("UA-873493-4");
pageTracker._initData();
pageTracker._trackPageview();
}

0 comments on commit 2bce7db

Please sign in to comment.