Permalink
Browse files

included google analytics code, only messure if on host jqapi.com

  • Loading branch information...
mustardamus committed Jan 10, 2013
1 parent 22e069c commit 2db90c542070724ad174e3bb90da28729dc11bc8
Showing with 14 additions and 1 deletion.
  1. +14 −1 app/views/index.haml
View
@@ -270,4 +270,17 @@
%span [2010-01-29]
Released very first version.
- %a{:href => 'http://twitter.com/jqapi'} Follow @jqapi for updates
+ %a{:href => 'http://twitter.com/jqapi'} Follow @jqapi for updates
+
+ :javascript
+ if(window.location.hostname !== 'jqapi.com') return;
+
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', 'UA-12732447-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);
+ })();

0 comments on commit 2db90c5

Please sign in to comment.