| | |
| | | |
| | | // Modules: https://go.nuxtjs.dev/config-modules |
| | | modules: [ |
| | | '@nuxtjs/gtm', |
| | | ], |
| | | plugins: [ |
| | | '~/plugins/gtm' |
| | | ], |
| | | // TODO: 置換為正確的 GTM CODE |
| | | gtm: { |
| | | enabled: true, /* see below */ |
| | | debug: false, |
| | | |
| | | id: 'GTM-XXXXXXX', |
| | | 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: { |