diff --git a/src/App.js b/src/App.js index a549ccd..57904c9 100644 --- a/src/App.js +++ b/src/App.js @@ -33,8 +33,14 @@ if (prod) { function App(props) { const [navOpen, setNavOpen] = useState(false); + useEffect(() => { + ReactGA.pageview(window.location.pathname); + }, []); useEffect(() => { window.scroll(0, 0); + if (prod) { + ReactGA.pageview(window.location.pathname); + } }, [props.location.pathname]); return ( <>