mirror of
https://github.com/status-im/fathom.git
synced 2025-03-01 03:20:27 +00:00
only add path if not already in pagesViewed
This commit is contained in:
parent
37897e9d35
commit
f7afb8c503
@ -112,7 +112,11 @@ function trackPageview() {
|
||||
let now = new Date();
|
||||
let midnight = new Date(Date.UTC(now.getFullYear(), now.getMonth(), now.getDate(), 24, 0, 0));
|
||||
let expires = Math.round((midnight - now) / 1000);
|
||||
data.pagesViewed.push(path);
|
||||
|
||||
if( data.pagesViewed.indexOf(path) == -1 ) {
|
||||
data.pagesViewed.push(path);
|
||||
}
|
||||
|
||||
data.isNewVisitor = false;
|
||||
data.isNewSession = false;
|
||||
data.lastSeen = +new Date();
|
||||
|
Loading…
x
Reference in New Issue
Block a user