From 4ecd05df63641e193e620612620916c6f4f2765a Mon Sep 17 00:00:00 2001 From: Tomas <tomasysh@gmail.com> Date: 星期二, 26 七月 2022 14:00:26 +0800 Subject: [PATCH] Merge branch 'feature/gtm' into Phase3 --- PAMapp/nuxt.config.js | 33 +++++++++++++++++++++++++++++++++ 1 files changed, 33 insertions(+), 0 deletions(-) diff --git a/PAMapp/nuxt.config.js b/PAMapp/nuxt.config.js index 64cc92d..ac032f6 100644 --- a/PAMapp/nuxt.config.js +++ b/PAMapp/nuxt.config.js @@ -60,7 +60,40 @@ // Modules: https://go.nuxtjs.dev/config-modules modules: [ + '@nuxtjs/gtm', ], + plugins: [ + '~/plugins/gtm' + ], + gtm: { + enabled: true, /* see below */ + debug: false, + + id: 'GTM-W2XMVJZ', + layer: 'dataLayer', + variables: {}, + + pageTracking: true, + pageViewEventName: 'nuxtRoute', + + autoInit: true, + respectDoNotTrack: true, + + scriptId: 'gtm-script', + scriptDefer: false, + scriptURL: 'https://www.googletagmanager.com/gtm.js', + crossOrigin: false, + + noscript: true, + noscriptId: 'gtm-noscript', + noscriptURL: 'https://www.googletagmanager.com/ns.html' + }, + + publicRuntimeConfig: { + gtm: { + id: process.env.GOOGLE_TAG_MANAGER_ID + } + }, // Build Configuration: https://go.nuxtjs.dev/config-build build: { -- Gitblit v1.8.0