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.

remove urlpath conditional

Francis Caodb845d6c0405
diff --git a/components/pages/realtime/RealtimeUrls.js b/components/pages/realtime/RealtimeUrls.js
index e2e52715a..06e815809 100644
--- a/components/pages/realtime/RealtimeUrls.js
+++ b/components/pages/realtime/RealtimeUrls.js
@@ -53,14 +53,12 @@ export default function RealtimeUrls({ websiteDomain, data = {} }) {
const pages = percentFilter(
pageviews
.reduce((arr, { urlPath }) => {
- if (urlPath?.startsWith('/')) {
- const row = arr.find(({ x }) => x === urlPath);
+ const row = arr.find(({ x }) => x === urlPath);
- if (!row) {
- arr.push({ x: urlPath, y: 1 });
- } else {
- row.y += 1;
- }
+ if (!row) {
+ arr.push({ x: urlPath, y: 1 });
+ } else {
+ row.y += 1;
}
return arr;
}, [])