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",
"version": "0.15.0",
"version": "0.15.1",
"description": "A simple, fast, website analytics alternative to Google Analytics. ",
"author": "Mike Cao <mike@mikecao.com>",
"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) => {
removeEvents();
currentRef = currentUrl;
const url = new URL(navaigatedUrl);
currentUrl = `${url.pathname}${url.search}`;
if (navaigatedUrl.startsWith('http')) {
const url = new URL(navaigatedUrl);
currentUrl = `${url.pathname}${url.search}`;
} else {
currentUrl = navaigatedUrl;
}
pageView();
};