Added events to MetricsBar.
parent
bb8f611604
commit
32be101044
|
@ -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…
Reference in New Issue