Learn business growth with Google Analytics 4 Forums Google Analytics 4 The Discrepancy in Sessions Between GA4 API runReport (v1beta) and Platform

  • The Discrepancy in Sessions Between GA4 API runReport (v1beta) and Platform

    Posted by Emily on 11 January 2023 at 6:46 pm

    I’ve noticed something a bit weird with the session counts when I query Data API https://analyticsdata.googleapis.com/v1beta/{propertyName}:runReport. It looks like the amount of sessions returned changes depending on the dimensions I’m asking for. So, if I send a request just with the “date” dimension, I get the same number of sessions reflected on the platform. However, things get pretty bizarre when I ask for both “date” and “transactionId”. The number of sessions I get back from the API is almost 1.4x higher. It’s a bit puzzling, right?

    Here’s how I set up my first request. This one just asked for the “date” dimension.

    {"dateRanges":[{"startDate":"2023-05-19","endDate":"2023-05-19"}],"dimensions":[{"name":"date"}],"metrics":[{"name":"sessions"}],"currencyCode":"CZK","keepEmptyRows":false,"offset":0,"limit":100000,"returnPropertyQuota":true}
    

    And here’s my second request. This one asked for both “date” and “transactionId”.

    {"dateRanges":[{"startDate":"2023-05-19","endDate":"2023-05-19"}],"dimensions":[{"name":"date"},{"name":"transactionId"}],"metrics":[{"name":"sessions"}],"currencyCode":"CZK","keepEmptyRows":false,"offset":0,"limit":100000,"returnPropertyQuota":true}
    

    I’ve dug around a bit, and found out that there’s an “(other)” row mentioned here in the dataset. Filtering out the sessions linked to this row brings the count closer to the first query. Any ideas what’s going on?

    Owen replied 1 year, 4 months ago 3 Members · 2 Replies
  • 2 Replies
  • Sofia

    Member
    15 May 2023 at 12:36 am

    When you use both “date” and “transactionId” in your query, you might be getting more sessions since multiple transactions can occur in one session. The mysterious “(other)” row collects data that doesn’t fit into the set parameters, such as sessions without transactions. So, ignoring this line makes results more comparable to your “date” only query.

  • Owen

    Member
    2 July 2023 at 3:22 pm

    When you add more dimensions to your request like “transactionId”, you’re drilling down further into the data. This might display more sessions that involve specific actions like transactions. As for the “(other)” row, Google uses that for a variety of data that doesn’t neatly fit into the other categories, which is why excluding it brings you closer to your original count.

Log in to reply.