Add check for Analytics ID

This commit is contained in:
Ramon Wenger 2019-02-14 11:26:47 +01:00
parent be9f4f4aae
commit f5d146df95
1 changed files with 6 additions and 4 deletions

View File

@ -46,10 +46,12 @@ Vue.use(VueScrollTo, {
offset: -50 offset: -50
}); });
Vue.use(VueAnalytics, { if (process.env.GOOGLE_ANALYTICS_ID) {
id: process.env.GOOGLE_ANALYTICS_ID || '', Vue.use(VueAnalytics, {
router id: process.env.GOOGLE_ANALYTICS_ID,
}); router
});
}
// taken from https://stackoverflow.com/questions/36170425/detect-click-outside-element // taken from https://stackoverflow.com/questions/36170425/detect-click-outside-element
Vue.directive('click-outside', { Vue.directive('click-outside', {