mirror of
https://github.com/status-im/fathom.git
synced 2025-03-01 03:20:27 +00:00
default to empty path if parsing from <a> fails. #73
This commit is contained in:
parent
ad29167db1
commit
67308e3348
@ -79,6 +79,11 @@ function trackPageview() {
|
||||
path = a.pathname;
|
||||
}
|
||||
|
||||
// if parsing path failed, default to main page
|
||||
if(!path) {
|
||||
path = '/';
|
||||
}
|
||||
|
||||
// only set referrer if not internal
|
||||
let referrer = '';
|
||||
if(document.referrer.indexOf(location.hostname) < 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user