react-ga4
react-ga4 copied to clipboard
Missing events when send event to multiple trackers
Hi everyone I have a config multiple trackers, however when I try to send event to each tracker, it's missing events in the second tracker.
ReactGA.initialize(tracker.trackingId);
this.trackers.push({
trackingId: tracker.trackingId,
});
trackers.forEach((tracker) => {
ReactGA.event(`Checkout started`, params); // Custom event
ReactGA.event(`view_item`, params); // GA4 event
....
});
My first tracker work as expected. The second tracker are missing most of events. What am I missing in the configuration ?
See this multiple products test as an example on how to initialize multiple products (i.e. trackers). There is also this example in the readme.