diff --git a/components/metrics/RealtimeViews.js b/components/metrics/RealtimeViews.js index 60d2b257..ed7797de 100644 --- a/components/metrics/RealtimeViews.js +++ b/components/metrics/RealtimeViews.js @@ -28,6 +28,15 @@ export default function RealtimeViews({ websiteId, data, websites }) { }, ]; + const renderLink = ({ x }) => { + const domain = x.startsWith('/') ? getDomain(websiteId) : ''; + return ( + + {x} + + ); + }; + const [referrers, pages] = useMemo(() => { if (pageviews) { const referrers = percentFilter( @@ -91,6 +100,7 @@ export default function RealtimeViews({ websiteId, data, websites }) { } metric={} + renderLabel={renderLink} data={pages} height={400} />