Fix tracker bug.

This commit is contained in:
Mike Cao 2020-08-22 19:59:39 -07:00
parent fa20f7f67f
commit 1d977875be
3 changed files with 10 additions and 4 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "umami", "name": "umami",
"version": "0.15.0", "version": "0.15.1",
"description": "A simple, fast, website analytics alternative to Google Analytics. ", "description": "A simple, fast, website analytics alternative to Google Analytics. ",
"author": "Mike Cao <mike@mikecao.com>", "author": "Mike Cao <mike@mikecao.com>",
"license": "MIT", "license": "MIT",

File diff suppressed because one or more lines are too long

View File

@ -56,8 +56,14 @@ import { post, hook, doNotTrack } from '../lib/web';
const handlePush = (state, title, navaigatedUrl) => { const handlePush = (state, title, navaigatedUrl) => {
removeEvents(); removeEvents();
currentRef = currentUrl; currentRef = currentUrl;
if (navaigatedUrl.startsWith('http')) {
const url = new URL(navaigatedUrl); const url = new URL(navaigatedUrl);
currentUrl = `${url.pathname}${url.search}`; currentUrl = `${url.pathname}${url.search}`;
} else {
currentUrl = navaigatedUrl;
}
pageView(); pageView();
}; };