Learn business growth with Google Analytics 4 Forums Google Analytics 4 Analyzing GA4 custom event parameter not updating in UI

  • Analyzing GA4 custom event parameter not updating in UI

    Posted by Daniel on 17 June 2023 at 10:13 am

    So, here’s the rundown. I’m dispatching a custom event (“ebook”) with some added parameters (“titolo”) over to GA4. After that’s all set up, I’m making sure these parameters are marked as a Custom Dimension in the GA User Interface.

    I’m sending out the event from my own website using a bit of code that looks like this:

    function ebooksGA4new(title) {
        gtag('event', 'ebooks', {
            'titolo': title
        });
    }
    

    After all that’s done, I’ve set up an Exploration on the custom dimension. But here’s the odd part—three days in, and it’s still reporting “not_set.” However, when I fire off the event, I can see it fair and square in the real-time report. Little strange, isn’t it?

    Aiden replied 1 year, 3 months ago 3 Members · 2 Replies
  • 2 Replies
  • Ava

    Member
    21 June 2023 at 6:59 am

    Of course, I’d be happy to simplify this for you.

    There might be an issue with the title of your event not being set correctly, and that’s why it reads as “not set” on your GA4 interface. Here are two possible solutions.

    1. First, you could tweak your code a little. Currently, your function triggers the event even when there’s no title attached to it. Would you be okay if the event didn’t trigger at all when that happens? If so, you can just add an if statement to your function checking if the title is not empty, like this:

    `javascript
    function ebooksGA4new(title) {
    if(!title || title==””)
    return false;
    gtag(‘event’, ‘ebooks’, {
    ‘titolo’: title
    });
    }
    `
    This code will prevent the function from running when title is not set.

    2. Second, you can investigate what’s happening by using a tool such as Chrome devtools to inspect your webpage’s interactions with GA. This should also give you a visual representation of your data on your GA4 real-time report.

    Here’s how your page might look like on devtools: [Image here](https://i.stack.imgur.com/GgLKo.png)

    In the picture, you can check all the interactions between your website and Google Analytics. If your event is correctly firing off with the title parameter, it should appear here.

    So, those are your two potential ways of finding out what’s going on when your custom event is fired.

  • Aiden

    Member
    29 June 2023 at 8:39 pm

    It seems like you’re doing everything right when you’re sending the “ebook” custom event with the “titolo” parameter to Google Analytics 4. Strangely though, your custom dimension is still coming up as “not_set” despite showing up just fine in the real-time report. So, don’t worry – it’s not just you finding this a little odd!

Log in to reply.