From 1224e81aaead7fbffd23df5c45f54148caf9485b Mon Sep 17 00:00:00 2001 From: Richard McCarthy Date: Thu, 31 Oct 2024 20:49:26 +0000 Subject: [PATCH] remove-analytics-console-log-statement-in-ci --- src/js/analytics.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/js/analytics.js b/src/js/analytics.js index 1e6ac1cd86..9c045fb49b 100644 --- a/src/js/analytics.js +++ b/src/js/analytics.js @@ -9,7 +9,9 @@ if (window.google_tag_manager !== undefined) { console.log('Data sent to Data Layer'); }; } else { - console.log('Google analytics not connected'); + if (process.env.RUNNING_IN_CI !== 'true') { + console.log('Google analytics not connected'); + } } export const trackElement = (el, type) => {