Skip to content

Commit c0f61cf

Browse files
committed
Update nuxt.config.ts with GTM and gtag integration
1 parent 347a45e commit c0f61cf

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

nuxt.config.ts

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,44 @@
11
// https://nuxt.com/docs/api/configuration/nuxt-config
22
export default defineNuxtConfig({
33
devtools: { enabled: false },
4+
45
typescript: {
56
shim: false,
67
},
8+
79
app: {
810
rootId: "vs-site-wrapper",
911
},
12+
1013
css: [
1114
"minireset.css/minireset.css",
1215
"@/assets/style/index.css",
1316
"@/assets/style/scrollbar.css",
1417
],
18+
1519
postcss: {
1620
plugins: {
1721
"postcss-nested": {},
1822
},
1923
},
20-
modules: ["@nuxt/content", "@nuxt/image"],
21-
});
24+
25+
modules: [
26+
'@nuxt/content',
27+
'@nuxt/image',
28+
'nuxt-gtag',
29+
'@zadigetvoltaire/nuxt-gtm',
30+
],
31+
gtag: {
32+
enabled: process.env.NODE_ENV === 'production', // Enable only in production
33+
id: 'G-TE6K13CVN3',
34+
},
35+
gtm: {
36+
enabled: process.env.NODE_ENV === 'production',
37+
id: 'GTM-M6CLXHQC',
38+
defer: false,
39+
debug: true,
40+
enableRouterSync: true,
41+
},
42+
43+
compatibilityDate: "2024-10-21",
44+
});

0 commit comments

Comments
 (0)