mirror of
https://github.com/umami-software/umami.git
synced 2026-02-19 03:55:37 +01:00
Added events to MetricsBar.
This commit is contained in:
parent
bb8f611604
commit
32be101044
1 changed files with 7 additions and 1 deletions
|
|
@ -43,7 +43,7 @@ export default function MetricsBar({ websiteId, className }) {
|
|||
setFormat(state => !state);
|
||||
}
|
||||
|
||||
const { pageviews, uniques, bounces, totaltime } = data || {};
|
||||
const { pageviews, uniques, bounces, totaltime, events } = data || {};
|
||||
const num = Math.min(data && uniques.value, data && bounces.value);
|
||||
const diffs = data && {
|
||||
pageviews: pageviews.value - pageviews.change,
|
||||
|
|
@ -70,6 +70,12 @@ export default function MetricsBar({ websiteId, className }) {
|
|||
change={uniques.change}
|
||||
format={formatFunc}
|
||||
/>
|
||||
<MetricCard
|
||||
label={<FormattedMessage id="metrics.events" defaultMessage="Events" />}
|
||||
value={events.value}
|
||||
change={events.change}
|
||||
format={formatFunc}
|
||||
/>
|
||||
<MetricCard
|
||||
label={<FormattedMessage id="metrics.bounce-rate" defaultMessage="Bounce rate" />}
|
||||
value={uniques.value ? (num / uniques.value) * 100 : 0}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue