diff --git a/public/index.html b/public/index.html index 5ad112b3..bedd85cc 100644 --- a/public/index.html +++ b/public/index.html @@ -1,16 +1,6 @@
- - - - diff --git a/src/App.js b/src/App.js index acb66aa2..eb2c5ca2 100755 --- a/src/App.js +++ b/src/App.js @@ -23,14 +23,12 @@ import { importAll } from './components/ImageBanner'; import preloadImages from './utils/preloadImages'; import showNewVersionToast from './utils/showNewVersionToast'; import useError from './hooks/useError'; -import useGoogleAnalytics from './hooks/useGoogleAnalytics'; import useInfo from './hooks/useInfo'; import useSuccess from './hooks/useSuccess'; import packageJson from '../package.json'; const commitRef = process?.env?.REACT_APP_COMMIT_REF || ''; export default function App() { - const { bodyStyle, setBodyStyle, @@ -46,7 +44,6 @@ export default function App() { const location = useLocation(); const isElectron = window.electron && window.electron.isElectron; - useGoogleAnalytics(); useEffect(() => { if (location.state?.scrollToTop) { diff --git a/src/hooks/useGoogleAnalytics.js b/src/hooks/useGoogleAnalytics.js deleted file mode 100644 index 626d0d89..00000000 --- a/src/hooks/useGoogleAnalytics.js +++ /dev/null @@ -1,25 +0,0 @@ -import { useEffect } from 'react'; -import { useLocation } from 'react-router-dom'; - -const GA_MEASUREMENT_ID = "G-2M2VYEFL7B"; - -const useGoogleAnalytics = () => { - const location = useLocation(); - -useEffect(() => { - if (typeof window.gtag === 'function') { - const fullPath = location.pathname + location.search + location.hash; - window.gtag('config', GA_MEASUREMENT_ID, { - 'page_path': fullPath, - }); - window.gtag('event', 'page_view', { - 'page_path': fullPath, - 'page_location': window.location.href.replace('/#', '') - }); - - } -}, [location]); - -}; - -export default useGoogleAnalytics;