Skip to content

Commit

Permalink
fix: disable Google analytics when building on Netlify.
Browse files Browse the repository at this point in the history
Customizes the Netlify build used to preview the website building in
development mode to disable the Google analytics. Therefore, we do not
pollute our dashboard with development data.

Signed-off-by: José Guilherme Vanz <[email protected]>
  • Loading branch information
jvanz committed May 17, 2024
1 parent 12f1d5f commit 2d0fdb3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 0 additions & 4 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,6 @@ module.exports = {
theme: {
customCss: [require.resolve("./src/css/custom.css")],
},
googleAnalytics: {
trackingID: "UA-56382716-13",
anonymizeIP: true,
},
gtag: {
trackingID: "G-PSW07XK7TM", // Google Analytics tracking ID for CNCF
anonymizeIP: true,
Expand Down
7 changes: 7 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Configuration file to customize the build process of the website when
# previewing it on Netlify.
[build]
publish = "build"
command = "yarn build -- --dev" # Build in development mode to disable Google Analytics


0 comments on commit 2d0fdb3

Please sign in to comment.