1
0
Fork 0

Do not track pageview etc. on localhost

This commit is contained in:
Daniel Kempkens 2014-03-30 16:46:25 +02:00
parent 7aae76e2bc
commit e201771d4c

View file

@ -10,10 +10,12 @@
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
(function() {
var host = window.location.host;
var host = window.location.hostname;
if (host !== 'localhost') { // No tracking on localhost
ga('create', '{{ site.google_analytics }}', host);
ga('send', 'pageview');
}
})();
</script>
{% endif %}