umami
umami copied to clipboard
[Proposal] Support for numeric metrics in event dashboard, e.g. for Web Vitals
The trackEvent function is potentially very useful for numeric metrics, e.g. web vitals (FCP, LCP, FID, CLS etc.), user interaction time, article transition value, ecommerce aggregates or any other processable number.
Nowadays every website developer is using some kind of web vitals tracker and umami is still lacking this feature, having almost every ingredient needed under the hood already.
When used like umami.trackEvent(String(now-pageRequestTime), 'nav_route_complete', url)
it collects exactly the data needed.
Unfortunately, the dashboard is currently incapable of displaying that info in any way, instead hiding the event url and grouping events by value. This ways events are not any different from page views, they are the same entities, just of different types.
Is would be great to be able to group events by url instead and to be able to run some math operator on top of event within a group, like SUM, AVG, MIN or MAX.
This issue is also related to #538, though it's not a full duplicate.
I'm personally in need of a self-hosted web vitals tracker and would rather gladly submit a pull request with this feature for umami than invest into plugging a different analytics engine into my new web project.
Web vitals are definitely on the roadmap. I'll see what we can do to expose the url part of events.
@mikecao Are core web vitals being worked on currently? I think umami is perfect for me, but I would like to be able to track core web vitals using the built-in functionality with Next.js. For core web vitals specifically, you could possibly use the same event tracking functionality used currently but have a Boolean to specify core web vitals such as umami(metric, cwv=true)
(possible metric structure).
P.S. I am new to open source on GitHub, so let me know if I did something wrong
Web vitals are definitely on the roadmap. I'll see what we can do to expose the url part of events.
This is exciting to hear. I've just started using umami today, so maybe this is a bit crazy, but I'm using the events feature to track non-200 response codes and it seems to be working great, except that I'm reporting the page urls as the event_value
s, and they're getting truncated in the UI. I can pull the full URLs from db directly, but exposing the full URL in the dashboard would be great :)
This issue is stale because it has been open for 60 days with no activity.
This issue was closed because it has been inactive for 7 days since being marked as stale.