-
The Discrepancy in Sessions Between GA4 API runReport (v1beta) and Platform
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?
Log in to reply.