Permalink
Browse files

Don't load GA on localhost

  • Loading branch information...
1 parent 3255903 commit 1dfe976550176db0f7b218c3cc38665c27a5ed7b @michaelklishin michaelklishin committed Aug 16, 2012
Showing with 4 additions and 4 deletions.
  1. +2 −2 _layouts/article.html
  2. +2 −2 _layouts/default.html
View
@@ -13,7 +13,7 @@
<script src='/assets/javascripts/toc.js'></script>
<meta content='text/html;charset=utf-8' http-equiv='Content-Type' />
<script type="text/javascript">
-
+ if(!(window.location.hostname === "localhost")) {
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-31282324-2']);
_gaq.push(['_trackPageview']);
@@ -23,7 +23,7 @@
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);
})();
-
+ }
</script>
</head>
<body>
View
@@ -14,7 +14,7 @@
<script src='http://twitter.github.com/bootstrap/assets/js/bootstrap-dropdown.js'></script>
<meta content='text/html;charset=utf-8' http-equiv='Content-Type' />
<script type="text/javascript">
-
+ if(!(window.location.hostname === "localhost")) {
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-31282324-2']);
_gaq.push(['_trackPageview']);
@@ -24,7 +24,7 @@
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);
})();
-
+ }
</script>
</head>
<body style='height: 100%'>

0 comments on commit 1dfe976

Please sign in to comment.