Fixed bounce rate calculation.

This commit is contained in:
Mike Cao 2020-08-24 10:52:47 -07:00
parent 13ec32b1c9
commit 2addb96e4b
2 changed files with 3 additions and 3 deletions

View file

@ -35,7 +35,7 @@ export default function MetricsBar({ websiteId, startDate, endDate, className })
<MetricCard label="Visitors" value={uniques} format={formatFunc} />
<MetricCard
label="Bounce rate"
value={uniques ? (bounces / uniques) * 100 : 0}
value={pageviews ? (bounces / pageviews) * 100 : 0}
format={n => Number(n).toFixed(0) + '%'}
/>
<MetricCard