mirror of
https://github.com/umami-software/umami.git
synced 2026-02-19 20:15:41 +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);
|
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 num = Math.min(data && uniques.value, data && bounces.value);
|
||||||
const diffs = data && {
|
const diffs = data && {
|
||||||
pageviews: pageviews.value - pageviews.change,
|
pageviews: pageviews.value - pageviews.change,
|
||||||
|
|
@ -70,6 +70,12 @@ export default function MetricsBar({ websiteId, className }) {
|
||||||
change={uniques.change}
|
change={uniques.change}
|
||||||
format={formatFunc}
|
format={formatFunc}
|
||||||
/>
|
/>
|
||||||
|
<MetricCard
|
||||||
|
label={<FormattedMessage id="metrics.events" defaultMessage="Events" />}
|
||||||
|
value={events.value}
|
||||||
|
change={events.change}
|
||||||
|
format={formatFunc}
|
||||||
|
/>
|
||||||
<MetricCard
|
<MetricCard
|
||||||
label={<FormattedMessage id="metrics.bounce-rate" defaultMessage="Bounce rate" />}
|
label={<FormattedMessage id="metrics.bounce-rate" defaultMessage="Bounce rate" />}
|
||||||
value={uniques.value ? (num / uniques.value) * 100 : 0}
|
value={uniques.value ? (num / uniques.value) * 100 : 0}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue