refactor: migrate nuxt gtm module to nuxt/scripts

This commit is contained in:
YunYouJun
2025-08-17 03:05:00 +08:00
parent 190c05918b
commit 13b6ad6047
13 changed files with 5587 additions and 3571 deletions

View File

@@ -20,13 +20,12 @@ export default defineNuxtConfig({
'@nuxt/eslint',
'@nuxt/test-utils/module',
'@zadigetvoltaire/nuxt-gtm',
'@yunlefun/vue/nuxt',
// fix QQ in iOS, Done
// See https://github.com/unjs/ofetch/pull/366
// 'nuxt-fix-ofetch',
'@nuxt/scripts',
],
ssr: false,
@@ -106,9 +105,16 @@ export default defineNuxtConfig({
},
},
gtm: {
id: 'GTM-5FJSV46',
},
pwa,
/**
* @see https://scripts.nuxt.com/scripts/tracking/google-tag-manager
*/
scripts: {
registry: {
googleTagManager: {
id: 'GTM-5FJSV46',
},
},
},
})