From 3ab9ef0fa8ce5a8b81cb5224d067a8e7f1c39a75 Mon Sep 17 00:00:00 2001 From: Kamran Ahmed Date: Sat, 16 Nov 2019 13:50:30 +0400 Subject: [PATCH] Do not send analytics for dev mode --- components/helmet/index.js | 27 ++++++++++++++++----------- lib/gtag.js | 10 ++++++++++ 2 files changed, 26 insertions(+), 11 deletions(-) diff --git a/components/helmet/index.js b/components/helmet/index.js index c4e141bc7..5c9072c9a 100644 --- a/components/helmet/index.js +++ b/components/helmet/index.js @@ -1,3 +1,4 @@ +const { PHASE_DEVELOPMENT_SERVER } = require('next/constants'); import NextHead from 'next/head'; import siteConfig from 'storage/site'; import { GA_TRACKING_ID } from 'lib/gtag'; @@ -22,13 +23,13 @@ const Helmet = (props) => ( - + - + @@ -55,15 +56,19 @@ const Helmet = (props) => ( { /* Global Site Tag (gtag.js) - Google Analytics */ } -