how do I get event label and event category parameters from event click in google analytics 4?

2.6k Views Asked by At

I send event_label and event_category parameters in the click event and I can see this data in the Realtime section, but I am not able to see this information in engagement nor in reports.

So, my question is, if this data is getting stored or I lose this data?, Is there a way to retrieve the historical data?

This is the way I send the parameters with the click event

window.gtag("event", 'click', {
    event_category: category,
    event_label: label,
  });

I already create a custom dimension for event_label but I have to wait around 48 hours to be able to use it in reports and see if I have the historical data

2

There are 2 best solutions below

0
Linda Lawton - DaImTo On

Universal analytics is completely diffrent then GA4.

Events in UA by default would record

enter image description here

by the actual call themself

gtag('event', <action>, {
  'event_category': <category>,
  'event_label': <label>,
  'value': <value>
});

Ga4 does not offer this same support.

If you want event_category and event_label in GA4 you will need to define them as custom dimensions and then set them yourself. This is not something that will work out of the box.

0
Shila Mosammami On

I suppose you are talking about GA4 and Not Universal, so you have to create these variables as custom dimensions in your analytics.google profile, and it takes 48 hours to get effected, before this time, you may get the result value as not set. Remember, once created a custom dimension it is not possible to change the Event parameter. Look at this photo

Then select "Create custom dimensions" and enter the info

enter image description here