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): Correctly extract pathname

Aldo Romána555d591539b
diff --git a/src/tracker/index.js b/src/tracker/index.js
index 491eef7da..4189abf64 100644
--- a/src/tracker/index.js
+++ b/src/tracker/index.js
@@ -43,10 +43,7 @@
};
const getPath = url => {
- if (url.substring(0, 4) === 'http') {
- return '/' + url.split('/').splice(3).join('/');
- }
- return url;
+ new URL(url).pathname;
};
const getPayload = () => ({