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.

limit realtime record set to 15

Francis Cao9b349b53c449
diff --git a/components/pages/realtime/RealtimeUrls.js b/components/pages/realtime/RealtimeUrls.js
index dfbf1fda6..18d8f2f65 100644
--- a/components/pages/realtime/RealtimeUrls.js
+++ b/components/pages/realtime/RealtimeUrls.js
@@ -10,6 +10,7 @@ export function RealtimeUrls({ websiteDomain, data = {} }) {
const { formatMessage, labels } = useMessages();
const { pageviews } = data;
const [filter, setFilter] = useState(FILTER_REFERRERS);
+ const limit = 15;
const buttons = [
{
@@ -47,7 +48,8 @@ export function RealtimeUrls({ websiteDomain, data = {} }) {
}
return arr;
}, [])
- .sort(firstBy('y', -1)),
+ .sort(firstBy('y', -1))
+ .slice(0, limit),
);
const pages = percentFilter(
@@ -62,7 +64,8 @@ export function RealtimeUrls({ websiteDomain, data = {} }) {
}
return arr;
}, [])
- .sort(firstBy('y', -1)),
+ .sort(firstBy('y', -1))
+ .slice(0, limit),
);
return [referrers, pages];