0

I am new to GA and I have integrated my react app with Google Analytics 4 and sent custom events to analytics like this ReactGA.event({category: 'abc', action: 'xyz'})

This created an event in GA4 but when I am exploring events and reports I couldn't find anywhere the metric/dimension named event_category. Please tell me how can I see the event_category of my events.

Hem
  • 122
  • 11

2 Answers2

1

What makes you think ReactGA is applicable for GA4? I glanced at their git repo and it looks like it's made for UA. GA4 is different. It has a different event model, different custom dimensions model, different tracking endpoint, different tracking id format. GA4 doesn't have a native concept of category or action.

You're trying to use a UA library to send GA4 events. Try this one: https://www.npmjs.com/package/react-ga4

Also, read this answer: Google Analytics 4 with React GA4 is still raw, despite the eagerness with which Google pushes it. We normally suggest sticking to UA for a few more years.

BNazaruk
  • 6,300
  • 3
  • 19
  • 33
0

I have exactly the same setup, and 'category' does indeed show up as 'event_category' in GA4.

There are many ways to view the event and its parameters. The easiest is perhaps: Reports>Engagement>Events. A dropdown at the top-left allows you to choose your event ('Enquire' here). Then a panel at the right has a dropdown showing all of the parameters; event_category shows up there.

enter image description here

Bill O
  • 315
  • 4
  • 13