googleanalytics / ga-dev-tools

A showcase of demos and tools built with the various Google Analytics APIs and Libraries.
https://ga-dev-tools.web.app/
Other
1.39k stars 557 forks source link

GA4 Query Explorer returns different results than API (v4) call. #1821

Open bksrocks opened 7 months ago

bksrocks commented 7 months ago

What page is this happening on https://ga-dev-tools.google/ga4/query-explorer/

Describe the bug I have been investigating the issue for a while. The report I am generating includes the following:

When comparing the results with the API response for the same call, the results differ for averageSessionDuration, engagementRate, and sessions. - For averageSessionDuration and engagementRate both sum and average aggregations return numbers that do not match the Google Dev Tool. For sessions, the aggregation being used is sum. newUsers and totalRevenue are an exact match.

A couple of questions I have on top of what might be causing such discrepancy:

Screenshots image image image image image

Additional context The troubleshooting was done using both date and sessionDefaultChannelGroup, just date and just sessionDefaultChannelGroup inside of the Google Dev Tool. None produced the expected results.