Skip to content

Commit

Permalink
fix: removing console logs
Browse files Browse the repository at this point in the history
  • Loading branch information
rpapani committed Sep 17, 2024
1 parent 56db7e7 commit 4395b24
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,8 @@ function convertToOpportunity(traffic) {
url, total, ctr, paid, owned, earned, channels, siteAvgCTR, ctrByUrlAndChannel,
} = traffic;

console.log('channels', channels);

const topChannels = Object.entries(channels)
.sort((a, b) => b[1].total - a[1].total).slice(0, CHANNELS_TO_CONSIDER);
console.log('topChannels', topChannels);
const opportunity = {
type: 'high-organic-low-ctr',
page: url,
Expand Down Expand Up @@ -67,7 +64,6 @@ function convertToOpportunity(traffic) {
paid: _paid,
},
};
console.log('trafficMetrics', trafficMetrics);
const ctrMetrics = {
type: 'ctr',
referrer: channel,
Expand All @@ -93,9 +89,7 @@ function handler(bundles, opts = {}) {
const { interval = 7 } = opts;

const trafficByUrl = trafficAcquisition.handler(bundles);
console.log('trafficByUrl', trafficByUrl);
const ctrByUrlAndChannel = getCTRByUrlAndChannel(bundles);
console.log('ctrByUrlAndChannel', ctrByUrlAndChannel);
const siteAvgCTR = getSiteAvgCTR(bundles);

return trafficByUrl.filter((traffic) => traffic.total > interval * DAILY_PAGEVIEW_THRESHOLD)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ function handler(bundles) {
})
.reduce(collectByUrlAndTrafficSource, {});

console.log('trafficSources before transform', trafficSources);

return transformFormat(trafficSources)
.sort((a, b) => b.total - a.total); // sort desc by total views
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ describe('Query functions', () => {
bundlesWithTraffic.rumBundles,
{ interval: 7 },
);
console.log(JSON.stringify(highInorganicHighBounceResult, null, 2));
expect(expectedHighOrganicLowCTRResult).to.eql(highInorganicHighBounceResult);
});
});

0 comments on commit 4395b24

Please sign in to comment.