From 9471b83743ac3620684d7035e9084f2647a26b5f Mon Sep 17 00:00:00 2001 From: Yuvraj Singh Sisodiya Date: Thu, 28 Sep 2023 12:59:47 +0530 Subject: [PATCH] fix: disable google analytics if domain not `asyncapi.com` (#2177) Co-authored-by: yuvrxj --- components/Head.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/Head.js b/components/Head.js index b353336ad2da..65c8869950b9 100644 --- a/components/Head.js +++ b/components/Head.js @@ -30,7 +30,7 @@ export default function HeadComponent({ title = title ? `${title} | ${permTitle}` : permTitle; //enable google analytics - if (typeof window !== 'undefined') { + if (typeof window !== 'undefined' && window.location.hostname === 'asyncapi.com') { TagManager.initialize({gtmId: 'GTM-T58BTVQ'}) ReactGA.initialize('UA-109278936-1') ReactGA.pageview(window.location.pathname + window.location.search)