diff --git a/src/app/base/hooks/analytics.ts b/src/app/base/hooks/analytics.ts index 8f3130ea88..9e34770936 100644 --- a/src/app/base/hooks/analytics.ts +++ b/src/app/base/hooks/analytics.ts @@ -105,18 +105,11 @@ export const useGoogleAnalytics = (): boolean => { }); ReactGA.send({ hitType: "pageview", - page: location.pathname + location.search, - title: location.pathname, + page: window.location.pathname + window.location.search, + title: window.location.pathname, }); } - }, [ - allowGoogleAnalytics, - authUser, - uuid, - version, - location.pathname, - location.search, - ]); + }, [allowGoogleAnalytics, authUser, uuid, version]); useEffect(() => { ReactGA.send({