Skip to content

Commit

Permalink
fix: debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
rpapani committed Jan 15, 2025
1 parent 3f513c2 commit 2b4e32e
Showing 1 changed file with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,18 @@ function handler(bundles, opts = {}) {
dataChunks.addSeries('viewmedia', eventCountFn('viewmedia'));

dataChunks.facets.urls.forEach((url) => {
const scrollDepthViewblock = (url.metrics.viewblock.sum / url.metrics.viewblock.count)
/ url.metrics.viewblock.max;
console.log(`scrollDepth using viewblock for ${url.value}: ${scrollDepthViewblock}`);
const scrollDepthViewmedia = (url.metrics.viewmedia.sum / url.metrics.viewmedia.count)
/ url.metrics.viewmedia.max;
console.log(`scrollDepth using viewmedia for ${url.value}: ${scrollDepthViewmedia}`);
let scrollDepthViewblock = 0;
let scrollDepthViewmedia = 0;
if (url.metrics.viewblock.max > 0) {
scrollDepthViewblock = (url.metrics.viewblock.sum / url.metrics.viewblock.count)
/ url.metrics.viewblock.max;
console.log(`scrollDepth using viewblock for ${url.value}: ${scrollDepthViewblock}`);

Check warning on line 82 in packages/spacecat-shared-rum-api-client/src/functions/opportunities/high-inorganic-high-bounce-rate.js

View workflow job for this annotation

GitHub Actions / Test

Unexpected console statement
}
if (url.metrics.viewmedia.max > 0) {
scrollDepthViewmedia = (url.metrics.viewmedia.sum / url.metrics.viewmedia.count)
/ url.metrics.viewmedia.max;
console.log(`scrollDepth using viewmedia for ${url.value}: ${scrollDepthViewmedia}`);

Check warning on line 87 in packages/spacecat-shared-rum-api-client/src/functions/opportunities/high-inorganic-high-bounce-rate.js

View workflow job for this annotation

GitHub Actions / Test

Unexpected console statement
}
console.log(`${url.value} viewblock: ${scrollDepthViewblock} viewmedia: ${scrollDepthViewmedia}`);

Check warning on line 89 in packages/spacecat-shared-rum-api-client/src/functions/opportunities/high-inorganic-high-bounce-rate.js

View workflow job for this annotation

GitHub Actions / Test

Unexpected console statement
});

Expand Down

0 comments on commit 2b4e32e

Please sign in to comment.