analytics working
This commit is contained in:
parent
e32139d2fe
commit
6f5fe0b417
|
@ -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 (
|
||||
<>
|
||||
|
|
Loading…
Reference in New Issue