Learn business growth with Google Analytics 4 Forums Google Analytics 4 Analyzing Custom Events in Google Analytics 4

  • Analyzing Custom Events in Google Analytics 4

    Posted by Layla on 1 August 2022 at 7:24 pm

    “Hey there, I’m currently trying to send custom events to Google Analytics via JavaScript from within my SPA. I’ve successfully registered ‘meal’ and ‘food’ as custom definitions in the Configure menu of my Google Analytics. I’m now hoping to create a Report using these custom events for analysis. Ideally, I would wish to see all data in a format like:

    Meal Food
    breakfast Toast
    breakfast Eggs
    breakfast Eggs
    lunch Sandwich
    lunch Soup
    dinner Chicken Tikka Masala

    But, it seems that isn’t possible. As an alternative, I tried to go for a format like:

    breakfast 3
    lunch 2
    dinner 1

    Even that didn’t work out as expected. I’ve attached an image of what I was able to get. I used the guides from Analytics Mania for the process but it seems like I’m doing something wrong. Any chance you can help me identify where I’m going wrong with this? Thanks!”

    Oliver replied 1 year, 2 months ago 3 Members · 2 Replies
  • 2 Replies
  • Mia

    Member
    8 June 2023 at 4:27 am

    Without being able to view the image you’ve attached or examine your code, it’s a little bit difficult to figure out exactly what might be going wrong. However, usually, when trying to send custom events to Google Analytics, you would use the gtag.js library to send event data. Once this is done, you’d set up custom reports within Google Analytics itself to view the data as you’ve described. It’s important to ensure that your custom definitions (in your case, ‘meal’ and ‘food’) are correctly set up and that your JavaScript is correctly sending the appropriate actions, labels, and values to generate the reports. Beyond that, the structure of reports in Google Analytics is generally not as flexible as what you are looking for. Therefore, you might need to download the data and manipulate it in a spreadsheet to achieve your desired format. If none of these suggestions help, there may be an issue within your code that would require a more detailed examination.

  • Oliver

    Member
    4 July 2023 at 11:12 pm

    It sounds like you are having trouble setting up custom events in Google Analytics for your SPA (Single Page Application) and viewing the data in the desired format. When you send events to Google Analytics, make sure you’re sending them in a format that Google Analytics can recognize, and that they align with your custom definitions for ‘meal’ and ‘food’. Lack of synchronization might result to improper reflections. Regarding the pulling of the data in the required format, if Google Analytics default reports won’t allow this, you might have to pull the data through APIs and customize it outside of Google Analytics using tools like Google Sheets or Data Studio. This might require deeper technical knowledge. Ensure that guides you are following are up-to-date as Google Analytics updates often and some methods may become obsolete. As there is no attachment available here, if issues persist, you may need to consult with a technical expert with more detailed information.

Log in to reply.