From 8382ee3dca8da9e69bc074b7c8cd25b91779651b Mon Sep 17 00:00:00 2001 From: Alex Ni <12097569+nialexsan@users.noreply.github.com> Date: Tue, 3 Dec 2024 14:09:29 -0500 Subject: [PATCH] add gtag --- docusaurus.config.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docusaurus.config.js b/docusaurus.config.js index ff21f9d..ff003d5 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -80,6 +80,14 @@ const config = { require.resolve("./src/css/custom.css"), ], }, + ...(process.env.GTAG + ? { + gtag: { + trackingID: process.env.GTAG, + anonymizeIP: true, + }, + } + : {}), }), ], ],