Queries to GA4 Data API that mix dimensions `isConversionEvents`, `sessionSourceMedium` with metric `sessions`, `eventCount` and `totalUsers` returns wrong results. #1800
Describe the bug
Queries to GA4 Data API that mix dimensions isConversionEvent, sessionSourceMedium with metric sessions, eventCount and totalUsers returns wrong results.
It was expected that queries with or without the metric totalUsers wold return same values for sessions and eventCount.
To Reproduce
Two similar JSON requests produce largelly different results. The difference between these two queries is the presence of the metric totalUsers.
What page is this happening on https://ga-dev-tools.google/ga4/query-explorer/
Describe the bug Queries to GA4 Data API that mix dimensions
isConversionEvent
,sessionSourceMedium
with metricsessions
,eventCount
andtotalUsers
returns wrong results.It was expected that queries with or without the metric
totalUsers
wold return same values forsessions
andeventCount
.To Reproduce Two similar JSON requests produce largelly different results. The difference between these two queries is the presence of the metric
totalUsers
.parameters account: yamaha-motor.com.br / property: yamaha-motor.com.br [GA4] (288084040)
First query results rows = 27, sessions = 476, eventCount = 576
Request JSON on query explorer:
{"dimensions":[{"name":"date"},{"name":"eventName"},{"name":"isConversionEvent"},{"name":"sessionSourceMedium"}],"metrics":[{"name":"eventCount"},{"name":"sessions"}],"dateRanges":[{"startDate":"2023-12-14","endDate":"2023-12-14"}],"dimensionFilter":{"filter":{"stringFilter":{"matchType":"EXACT","value":"true"},"fieldName":"isConversionEvent"}}}
property 288084040 - first query results.json
Second query results (added totalUsers) rows = 4, sessions = 409, eventCount = 497
Request JSON on query explorer:
{"dimensions":[{"name":"date"},{"name":"eventName"},{"name":"isConversionEvent"},{"name":"sessionSourceMedium"}],"metrics":[{"name":"eventCount"},{"name":"sessions"},{"name":"totalUsers"}],"dateRanges":[{"startDate":"2023-12-14","endDate":"2023-12-14"}],"dimensionFilter":{"filter":{"stringFilter":{"matchType":"EXACT","value":"true"},"fieldName":"isConversionEvent"}}}
property 288084040 - second query results (added totalUsers).json
Desktop (please complete the following information):
Additional context Issues repeats with same wrong results for requests on Python library google.analytics.data_v1beta and within curl.