Fixed analytics pageview being sent on localhost

This commit is contained in:
Kasper Rynning-Tønnesen
2018-02-02 12:37:27 +01:00
parent 6d53455d41
commit ea0a18e5dd
3 changed files with 13 additions and 7 deletions

View File

@@ -8,7 +8,9 @@ var Channel = {
mobile_beginning = Helper.mobilecheck();
var side = Helper.mobilecheck() ? "left" : "right";
ga('send', 'pageview');
if(window.location.hostname != "localhost") {
ga('send', 'pageview');
}
window.onpopstate = function(e){
Channel.onepage_load();