Open niitprachi opened 5 years ago
I have the same question
I have solved this by storing the time when page unloads and then combining the stored time with the current time.
function combineTimers(storedTime) {
return TimeMe.getTimeOnAllPagesInSeconds().reduce((obj, p) => {
obj[p.pageName] = Math.round((obj[p.pageName] || 0) + p.timeOnPage);
return obj;
}, storedTime);
}
Hi,
Thanks for this great plugin. as I can see when page is reloaded, time counter is set to '0'. I have below query
1) lets say if user spent 2 min on home page and then goto about page, is there a way on about page counter should continue i..e start from 2 min and go ahead
i.e. instead of tracking time spent on page I would like to see total time spent on website when user visited different pages
Thanks Pravin