Skip to content

Commit e60dcac

Browse files
authored
Merge pull request #4510 from Blargian/exclude_ga_tag_vercel
Exclude GA tag manager from preview deployments
2 parents 7603ab5 + e47002d commit e60dcac

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
@@ -200,9 +200,11 @@ const config = {
200200
theme: {
201201
customCss: [require.resolve("./src/css/custom.scss")],
202202
},
203-
googleTagManager: {
204-
containerId: 'GTM-WTNTDT7W',
205-
},
203+
...(process.env.VERCEL_PREVIEW !== '1' && {
204+
googleTagManager: {
205+
containerId: 'GTM-WTNTDT7W',
206+
},
207+
}),
206208
}),
207209
],
208210
],

docusaurus.config.jp.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,11 @@ const config = {
165165
theme: {
166166
customCss: [require.resolve("./src/css/custom.scss")],
167167
},
168-
googleTagManager: {
169-
containerId: 'GTM-WTNTDT7W',
170-
},
168+
...(process.env.VERCEL_PREVIEW !== '1' && {
169+
googleTagManager: {
170+
containerId: 'GTM-WTNTDT7W',
171+
},
172+
}),
171173
}),
172174
],
173175
],

docusaurus.config.ru.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,11 @@ const config = {
166166
theme: {
167167
customCss: [require.resolve("./src/css/custom.scss")],
168168
},
169-
gtag: {
170-
trackingID: "G-KF1LLRTQ5Q",
171-
},
169+
...(process.env.VERCEL_PREVIEW !== '1' && {
170+
googleTagManager: {
171+
containerId: 'GTM-WTNTDT7W',
172+
},
173+
}),
172174
}),
173175
],
174176
],

docusaurus.config.zh.js

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

0 commit comments

Comments
 (0)