analytics working
This commit is contained in:
parent
e32139d2fe
commit
6f5fe0b417
|
@ -33,8 +33,14 @@ if (prod) {
|
||||||
|
|
||||||
function App(props) {
|
function App(props) {
|
||||||
const [navOpen, setNavOpen] = useState(false);
|
const [navOpen, setNavOpen] = useState(false);
|
||||||
|
useEffect(() => {
|
||||||
|
ReactGA.pageview(window.location.pathname);
|
||||||
|
}, []);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
window.scroll(0, 0);
|
window.scroll(0, 0);
|
||||||
|
if (prod) {
|
||||||
|
ReactGA.pageview(window.location.pathname);
|
||||||
|
}
|
||||||
}, [props.location.pathname]);
|
}, [props.location.pathname]);
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|
Loading…
Reference in New Issue