From 2d0fdb378369d5d257309a00d6cdc1551401ff4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Guilherme=20Vanz?= Date: Thu, 16 May 2024 16:07:49 -0300 Subject: [PATCH] fix: disable Google analytics when building on Netlify. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- docusaurus.config.js | 4 ---- netlify.toml | 7 +++++++ 2 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 netlify.toml diff --git a/docusaurus.config.js b/docusaurus.config.js index 79de0ec15a..dfb01f60ae 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -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, diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 0000000000..3a08b41197 --- /dev/null +++ b/netlify.toml @@ -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 + +