diff --git a/client/src/main.js b/client/src/main.js index ef91cff9..84de1742 100644 --- a/client/src/main.js +++ b/client/src/main.js @@ -46,10 +46,12 @@ Vue.use(VueScrollTo, { offset: -50 }); -Vue.use(VueAnalytics, { - id: process.env.GOOGLE_ANALYTICS_ID || '', - router -}); +if (process.env.GOOGLE_ANALYTICS_ID) { + Vue.use(VueAnalytics, { + id: process.env.GOOGLE_ANALYTICS_ID, + router + }); +} // taken from https://stackoverflow.com/questions/36170425/detect-click-outside-element Vue.directive('click-outside', {