Skip to content

Commit

Permalink
fix: disable google analytics if domain not asyncapi.com (#2177)
Browse files Browse the repository at this point in the history
Co-authored-by: yuvrxj <yuvrajsisodiya7302@gmail,com>
  • Loading branch information
Yuvraj Singh Sisodiya authored Sep 28, 2023
1 parent 43e8fcc commit 9471b83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/Head.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9471b83

Please sign in to comment.