Marco Sumali
Dec 27, 2021

--

Hi Nelson, based on my experience ReactGA doesn't support measurement ID from Google Analytics 4 (GA4) property and if you check to the following documentation, it's mentioned that:

"ReactGA is designed to work with the latest version of Google Analytics, Universal Analytics (UA)."

https://www.npmjs.com/package/react-ga

Google has two analytics property that you can use atm which are UA (use tracking Id) and GA4 (use measurement Id).

So I would suggest the following:

1. Change your analytics property to UA by creating a new one and use ReactGA package, or

2. If you plan to stick in using GA4, I would suggest to use other package such as https://www.npmjs.com/package/react-ga4

Hope this helps !

Cheers,

Marco

--

--