Google Analytics not sending different pages aside from home page in ReactJS(Vite)
Jul 18 '25
Comments: 1
Answers: 0
0
I'm using react-ga4 for my [portfolio[(https://vicentereyes.org). I have a PageViewTracker.jsx which has:
import { useEffect } from 'react'
import { useLocation } from 'react-router-dom';
import { trackPageView } from '../utils/analytics';
const PageViewTracker = ({ children }) => {
const location = useLocation();
useEffect(() => {
trackPageView(location);
}, [location]);
return children;…
Open Full Question
More...