Skip to content

armgit / umami

Public Imported from GitHub
0

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.

fix(tracker): Remove domain name when parsing url

Cedricbd360207a653
diff --git a/src/tracker/index.js b/src/tracker/index.js
index 43a515013..438c08d2a 100644
--- a/src/tracker/index.js
+++ b/src/tracker/index.js
@@ -52,6 +52,12 @@
};
const parseURL = url => {
+ try {
+ const { pathname, search } = new URL(url);
+ url = pathname + search;
+ } catch {
+ /* empty */
+ }
return excludeSearch ? url.split('?')[0] : url;
};