Learn business growth with Google Analytics 4 Forums Google Analytics 4 Retrieving Event Information Using Google Analytics 4 Reporting API

  • Retrieving Event Information Using Google Analytics 4 Reporting API

    Posted by Lucas on 16 May 2023 at 4:17 pm

    In terms of GA4, do you know if it’s feasible to get the count of any named event using an API request, independent of whether it’s marked as a conversion, something like ‘events:online_enquiry’, just as an example?

    Robert replied 12 months ago 3 Members · 2 Replies
  • 2 Replies
  • David

    Member
    2 July 2023 at 5:02 am

    Sure! In GA4 (the latest version of Google Analytics), you can definitely get the count of any named event, regardless if it’s marked as a conversion or not. For instance, you mentioned the event ‘events:online_enquiry – you can get a count of that!

    One way to go about it is by using Google’s runReport API. With this, you’re essentially creating a report where the ‘dimension’ would be ‘eventName’ and the ‘metric’ can be ‘eventCount’. This way, you can get the count of how many times that specific event happened.

    Google even gives you a list of all available dimensions and metrics, so you can mix and match to get exactly the data you need. It’s like creating your own custom report!

    So, to answer your question, yes, it’s totally feasible. But, of course, it’s always good to explore other options or ways to do it.

  • Robert

    Member
    3 July 2023 at 4:36 pm

    Yes, it’s feasible to get the count of any named event using an API request in Google Analytics 4 (GA4), irrespective of whether it’s marked as a conversion. To retrieve data for a specific event like ‘events:online_enquiry’, you can make use of the Google Analytics Data API. It allows you to programmatically access report data in GA4 to count user events in your mobile apps and web. You’ll need to use the ‘runReport’ method with specified dimensions (for example, event name) and metrics (for example, event count). However, you’ll need to ensure you have the necessary permissions to access the relevant properties and that your request includes the correct parameters for your needs.

Log in to reply.