Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.
TypeScript analyticsaudience-segmentationchartscohort-analysisgoogle-analyticsproduct-analyticsstatisticsuser-journeyweb-analytics
Update url checking logic.
Mike Cao4ae7ad35fffd
diff --git a/tracker/index.js b/tracker/index.jsindex 9a5051b8a..f7f009277 100644--- a/tracker/index.js+++ b/tracker/index.js@@ -58,14 +58,14 @@ import { removeTrailingSlash } from '../lib/url';/* Handle history */- const handlePush = (state, title, navigatedURL) => {+ const handlePush = (state, title, url) => {removeEvents();currentRef = currentUrl;- const newUrl = navigatedURL.toString();+ const newUrl = url.toString();- if (newUrl.startsWith('http')) {- const url = new URL(newUrl);- currentUrl = `${url.pathname}${url.search}`;+ if (newUrl.substring(0, 4) === 'http') {+ const { pathname, search } = new URL(newUrl);+ currentUrl = `${pathname}${search}`;} else {currentUrl = newUrl;}