Because of the upcoming GA4, we will start using react-ga4 instead of react-ga. And we have these lines in our code for the GA initialization from the react-ga.
ReactGA.plugin.require('displayfeatures');
ReactGA.plugin.require('ec');
I couldn't find how to use them with react-ga4. Do you know how can we use them?
Note: We use the ec
for ec:addImpression
. Sending an impression is a bit different in GA4 & react-ga4. We send it with React.GA.event(....)
now. Maybe we don't need the ec
plugin at all but tbh I don't know if we're doing it correctly or not. It would have been nice to get some ideas.