diff --git a/commafeed-client/src/App.tsx b/commafeed-client/src/App.tsx index 4aab69c1..e3f84ff6 100644 --- a/commafeed-client/src/App.tsx +++ b/commafeed-client/src/App.tsx @@ -122,7 +122,7 @@ function GoogleAnalyticsHandler() { }, [googleAnalyticsCode]) useEffect(() => { - ReactGA.send({ hitType: "pageview", page: location.pathname }) + if (ReactGA.isInitialized) ReactGA.send({ hitType: "pageview", page: location.pathname }) }, [location]) return null