Skip to content

Commit 24800c9

Browse files
Add GTAG to Docs website (#1292)
* Add GTAG to Docs website * Update lockfile * Removing dotenv from 🦖.
1 parent e5142ca commit 24800c9

File tree

2 files changed

+41
-31
lines changed

2 files changed

+41
-31
lines changed

Diff for: pnpm-lock.yaml

+30-29
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: website/docusaurus.config.js

+11-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ async function createConfig() {
2121

2222
presets: [
2323
[
24-
'classic',
24+
'@docusaurus/preset-classic',
2525
/** @type {import("@docusaurus/preset-classic").Options} */
2626
({
2727
docs: {
@@ -45,7 +45,16 @@ async function createConfig() {
4545
},
4646
theme: {
4747
customCss: [require.resolve('./src/css/custom.scss')]
48-
}
48+
},
49+
...(process.env.VERCEL_ENV === 'production' && {
50+
gtag: {
51+
trackingID: process.env.GTAG_TRACKING_ID,
52+
anonymizeIP: true
53+
},
54+
googleTagManager: {
55+
containerId: process.env.GTM_CONTAINER_ID
56+
}
57+
})
4958
})
5059
]
5160
],

0 commit comments

Comments
 (0)