codler / react-ga4

React Google Analytics 4
https://www.npmjs.com/package/react-ga4
266 stars 34 forks source link

[Request] Support exception events #40

Open fehbari opened 1 year ago

fehbari commented 1 year ago

The following was possible in react-ga.

ReactGA.exception({
  description: 'An error occurred',
  fatal: true
})

In react-ga4, this seems to be disabled entirely.

case "exception":
        console.warn(`Unsupported send command: ${hitType}`);
        break;

This is a valuable feature of GA, and it's absence makes it a bit harder to use react-ga4 as a drop in replacement of react-ga for those migrating to GA4.

If this isn't in scope, I'd appreciate some advice on how to add it to my application without having to switch back to the basic GA client.