minor fixes in counter script

This commit is contained in:
severak 2020-01-16 12:07:13 +01:00
parent ae0b2baeec
commit 9bb1a407ed
1 changed files with 3 additions and 3 deletions

View File

@ -20,7 +20,7 @@
search: match[6],
hash: match[7]
} || { href: href };
}
};
var parseQuery = function(queryString) {
var query = {};
var pairs = (queryString[0] === '?' ? queryString.substr(1) : queryString).split('&');
@ -29,7 +29,7 @@
query[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1] || '');
}
return query;
}
};
var selfUrl = getLocation(document.location.href);
// commented out for now // if (selfUrl=='localhost') return;
@ -46,7 +46,7 @@
if (Q.utm_source || Q.ref || Q.pk_campaign) {
bonzUrl += '&ref=' + encodeURIComponent(Q.utm_source || Q.ref || Q.pk_campaign);
} else if (Q.fbclid) {
bonzUrl += '&ref=facebook';
bonzUrl += '&ref=facebook.com';
} else if (refUrl.hostname && selfUrl.hostname != refUrl.hostname) {
bonzUrl += '&ref=' + encodeURIComponent(refUrl.hostname + refUrl.pathname);
}