From cad1e220eb4b785e49c56dce4d2bc15997d4b0d2 Mon Sep 17 00:00:00 2001 From: Manuel Calavera Date: Wed, 24 Jul 2019 07:48:09 -0700 Subject: [PATCH] fix: init ga and mixpanel only in prod env --- public/index.html | 16 +++++++++++----- src/v2/mixpanel.js | 4 +++- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/public/index.html b/public/index.html index 97acdab3..c9d1a2dd 100755 --- a/public/index.html +++ b/public/index.html @@ -1,12 +1,18 @@ - diff --git a/src/v2/mixpanel.js b/src/v2/mixpanel.js index 10140d9c..8e762201 100644 --- a/src/v2/mixpanel.js +++ b/src/v2/mixpanel.js @@ -1,7 +1,9 @@ import mixpanel from 'mixpanel-browser'; -mixpanel.init('a733ed40b877d30ff2a1a58b4e326cf0'); const isProduction = process.env.NODE_ENV === 'production'; +if (isProduction) { + mixpanel.init('a733ed40b877d30ff2a1a58b4e326cf0'); +} export default { identify: id => {