Fixed bounce rate calculation.

This commit is contained in:
Mike Cao committed 2020-08-27 19:11:35 -07:00
1 parent 13ec32b1c9
commit 2addb96e4b
2 files changed
+3 -3

No files matched your search

+1 -1
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