Discrepancy between totalUsers in GA4 API and Snowflake query results

Summary

The user is experiencing a discrepancy between the totalUsers metric obtained from the GA4 API and the Snowflake query results. Other metrics like activeUsers, eventCount, and screenPageViews are correct. The user provided sample API and Snowflake queries for reference.


Question

Hello! I have a connection from GA4 to Snowflake. The issue I am having is that seems given a timeframe (I made sure to use an older timeframe to avoid sync issues), I get the correct number of activeUsers, eventCount and screenPageViews . But my totalUsers is way off, I tried calling the GA4 API directly and getting the same fields, but the values are different from Snowflake.

Follows the queries I am doing:

API Query to GA4:

  --url <https://analyticsdata.googleapis.com/v1beta/properties/*:runReport> \
  --data '{"dimensions":[{"name":"pagePath"},{"name": "date"}],"metrics":[{"name":"screenPageViews"},{"name":"totalUsers"},{"name":"newUsers"},{"name":"eventCount"}],"dateRanges":[{"startDate":"2024-06-22","endDate":"2024-07-22"}],"metricAggregations":["TOTAL"]}'```
Query on Snowflake:
```SELECT
    PAGEPATH,
    sum(screenpageviews) as page_views,
    sum(TOTALUSERS) as total_users,
    sum(newusers) as new_users,
    sum(eventcount) as event_count
FROM
    PAGES_PATH_REPORT
WHERE TO_DATE(DATE, 'YYYYMMDD') &gt;= '2024-06-22'
    AND TO_DATE(DATE, 'YYYYMMDD') &lt;= '2024-07-22'
group by 1 
order by page_views desc;```
If I compare the `total_users` in Snowflake and the TOTAL metricAggregation in GA4, the numbers are different. Although the `eventCount` and the rest are correct. Would very much appreciate if someone could help me understand why, thanks a lot in advance!

<br>

---

This topic has been created from a Slack thread to give it more visibility.
It will be on Read-Only mode here. [Click here](https://airbytehq.slack.com/archives/C021JANJ6TY/p1721940479255779) if you want 
to access the original thread.

[Join the conversation on Slack](https://slack.airbyte.com)

<sub>
["ga4", "snowflake", "totalusers", "api", "discrepancy", "metrics"]
</sub>

Also opened an issue: https://github.com/airbytehq/airbyte/issues/42547