From 3fc6dd621ba1a31f511f1d75377381a589801b68 Mon Sep 17 00:00:00 2001 From: Alina Rublea Date: Fri, 20 Dec 2024 11:06:35 +0100 Subject: [PATCH] Update packages/spacecat-shared-rum-api-client/src/functions/total-metrics.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ekrem Doğan --- .../src/functions/total-metrics.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/spacecat-shared-rum-api-client/src/functions/total-metrics.js b/packages/spacecat-shared-rum-api-client/src/functions/total-metrics.js index 441180a9..0a932c15 100644 --- a/packages/spacecat-shared-rum-api-client/src/functions/total-metrics.js +++ b/packages/spacecat-shared-rum-api-client/src/functions/total-metrics.js @@ -20,7 +20,7 @@ function handler(bundles) { dataChunks.addSeries('ctr', (bundle) => (bundle.events.some((e) => e.checkpoint === 'click') ? bundle.weight : 0)); - const totalPageViews = dataChunks?.totals?.traffic_domain?.sum; + const totalPageViews = dataChunks?.totals?.traffic_domain?.weight; const totalCTR = dataChunks?.totals?.ctr?.sum / dataChunks?.totals?.ctr?.weight; return { totalPageViews,