From ad5fa4cda4b4a6a1d1c394dc7483a8676a3cfb44 Mon Sep 17 00:00:00 2001 From: Minzkraut Date: Wed, 23 Mar 2022 12:54:04 +0100 Subject: [PATCH] Add Google Tagmanager --- public/index.html | 4 ++++ src/gtm.js | 5 +++++ src/main.js | 1 + 3 files changed, 10 insertions(+) create mode 100644 src/gtm.js diff --git a/public/index.html b/public/index.html index ec79dae..c8de91e 100644 --- a/public/index.html +++ b/public/index.html @@ -10,6 +10,10 @@ + + + diff --git a/src/gtm.js b/src/gtm.js new file mode 100644 index 0000000..6b86af5 --- /dev/null +++ b/src/gtm.js @@ -0,0 +1,5 @@ +(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': +new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], +j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= +'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); +})(window,document,'script','dataLayer','GTM-WBRJ8KX'); \ No newline at end of file diff --git a/src/main.js b/src/main.js index f26f408..abdaba9 100644 --- a/src/main.js +++ b/src/main.js @@ -1,6 +1,7 @@ import Vue from 'vue' import App from './App.vue' import vuetify from './plugins/vuetify' +import './gtm.js' Vue.config.productionTip = false