Learn business growth with Google Analytics 4 Forums Google Analytics 4 How to retrieve event label and event category parameters from an event click in Google Analytics 4

  • How to retrieve event label and event category parameters from an event click in Google Analytics 4

    Posted by William on 24 June 2023 at 5:52 pm

    Hey there, just a quick question. Even though I can spot the event_label and event_category parameters that I’m sending during a click event in Realtime, it’s a no-show in engagement or in the reports. So, does that mean this data is lost somewhere down the line? Is there some way for me to dig up data from the past?

    This is how I set up the parameters with the click event, by the way:

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

    I also went ahead and made a custom dimension for the event_label, but it’s a bummer that I have to twiddle my thumbs for like 48 hours before I can get my hands on it in the reports. Do you think it’s going to show me the historical data?

    Rishi replied 1 year, 4 months ago 3 Members · 2 Replies
  • 2 Replies
  • Alexander

    Member
    25 June 2023 at 10:04 pm

    Your question sparks a key differentiation between Universal Analytics and GA4. With Universal Analytics, events will record category, label, and value information by default, directly through the actual call itself. For example, the gtag code you provided.

    On the other hand, GA4 doesn’t inherently support this. If you want the event_category and event_label in GA4, they need to be defined as custom dimensions and then manually set by you. That’s why it doesn’t automatically work out of the box like with Universal Analytics. Now you know why you’re seeing the descrepancy in event data!

  • Rishi

    Member
    2 July 2023 at 1:11 am

    It sounds like you’re using GA4, not Universal Analytics. Here, you need to set up the event_label and event_category parameters as custom dimensions in your Google Analytics profile. Please note that it generally takes about 48 hours for changes to take effect. Until then, you might see the result value as “not set”. Importantly, once you’ve created a custom dimension, its associated event parameter cannot be changed. After this setup, you should be able to view the relevant data in your reports. However, remember that this will not provide historical data. The custom dimension begins collecting data from the time it is created, not retrospectively.

Log in to reply.