From d53c8de828291c3793b51bcdb9f454e73d87142e Mon Sep 17 00:00:00 2001 From: edo999 Date: Sat, 20 Apr 2024 12:48:59 +0100 Subject: [PATCH] =?UTF-8?q?Use=20the=20analytics=20in=20prod=20only=20?= =?UTF-8?q?=F0=9F=93=8A.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/index.html | 9 ++++----- src/index.js | 6 ++++++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/index.html b/src/index.html index 3b7cbee..4f98915 100644 --- a/src/index.html +++ b/src/index.html @@ -3,6 +3,9 @@ SCUMM NES resource explorer + @@ -34,13 +37,9 @@ } })(window.location); + - - diff --git a/src/index.js b/src/index.js index 9deb1da..06ed088 100644 --- a/src/index.js +++ b/src/index.js @@ -11,3 +11,9 @@ root.render( , ); + +if (process.env.NODE_ENV === 'production') { + // Load the analytics. + insights.init('OTy7QFoUv4bUuKzo'); + insights.trackPages(); +}