// Simply replace `react-ga` with `react-ga4`
import ReactGA from "react-ga";
import ReactGA from "react-ga4";
npm i react-ga4
import ReactGA from "react-ga4";
ReactGA.initialize("your GA measurement id");
ReactGA.send("pageview");
MIT
React Google Analytics 4
// Simply replace `react-ga` with `react-ga4`
import ReactGA from "react-ga";
import ReactGA from "react-ga4";
npm i react-ga4
import ReactGA from "react-ga4";
ReactGA.initialize("your GA measurement id");
ReactGA.send("pageview");
MIT
React Google Analytics 4