Skip to content

Commit dcae3cf

Browse files
committed
Don't use gtag in preview environments
1 parent 688050d commit dcae3cf

File tree

4 files changed

+20
-12
lines changed

4 files changed

+20
-12
lines changed

docusaurus.config.en.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,11 @@ const config = {
197197
theme: {
198198
customCss: [require.resolve("./src/css/custom.scss")],
199199
},
200-
googleTagManager: {
201-
containerId: 'GTM-WTNTDT7W',
202-
},
200+
...(process.env.VERCEL_PREVIEW !== '1' && {
201+
googleTagManager: {
202+
containerId: 'GTM-WTNTDT7W',
203+
},
204+
}),
203205
}),
204206
],
205207
],

docusaurus.config.jp.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,11 @@ const config = {
162162
theme: {
163163
customCss: [require.resolve("./src/css/custom.scss")],
164164
},
165-
googleTagManager: {
166-
containerId: 'GTM-WTNTDT7W',
167-
},
165+
...(process.env.VERCEL_PREVIEW !== '1' && {
166+
googleTagManager: {
167+
containerId: 'GTM-WTNTDT7W',
168+
},
169+
}),
168170
}),
169171
],
170172
],

docusaurus.config.ru.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,11 @@ const config = {
163163
theme: {
164164
customCss: [require.resolve("./src/css/custom.scss")],
165165
},
166-
gtag: {
167-
trackingID: "G-KF1LLRTQ5Q",
168-
},
166+
...(process.env.VERCEL_PREVIEW !== '1' && {
167+
googleTagManager: {
168+
containerId: 'GTM-WTNTDT7W',
169+
},
170+
}),
169171
}),
170172
],
171173
],

docusaurus.config.zh.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,11 @@ const config = {
162162
theme: {
163163
customCss: [require.resolve("./src/css/custom.scss")],
164164
},
165-
gtag: {
166-
trackingID: "G-KF1LLRTQ5Q",
167-
},
165+
...(process.env.VERCEL_PREVIEW !== '1' && {
166+
googleTagManager: {
167+
containerId: 'GTM-WTNTDT7W',
168+
},
169+
}),
168170
}),
169171
],
170172
],

0 commit comments

Comments
 (0)