google-analytics - 与常规 Google Analytics 相比,从 GA4 获取的数据不准确

标签 google-analytics google-analytics-api google-analytics-4

我编写了一个 python 脚本来获取网站上的活跃用户数量,但我最近发现从 GA4 获取的数量少于常规 GA 的数量。

作为信息,我获取了过去 5 分钟内的活跃用户数,我认为在计算活跃用户数时,这是有关 GA 的正确数字。

如果我获得默认持续时间(30 分钟),那么我会获得更多数据。

举个例子,在 GA 中,我目前有“310”个活跃用户,但在 GA4 上,我在过去 5 分钟内有“83”个活跃用户,在过去 30 分钟内有“448”个活跃用户。

这是我的代码:

#Runs a realtime report on a Google Analytics 4 property.
client = BetaAnalyticsDataClient()
#Run the request.
request = RunRealtimeReportRequest(
    property=f"properties/{property_id}",
    metrics=[Metric(name="activeUsers")],
        minute_ranges=[MinuteRange(start_minutes_ago=29, end_minutes_ago=0)]
)
#Parse the response.
response = client.run_realtime_report(request)

最佳答案

这两个版本测量的内容并不相同,GA4 预计会向更多用户展示:

The Realtime report in Google Analytics 4 properties counts users who engaged with your app/site for any non-zero amount of time during the previous 30 minutes, while the Streamview (realtime) report in Universal Analytics Standard/360 properties counts any user who triggered an event during the previous five minutes.

Source

关于google-analytics - 与常规 Google Analytics 相比,从 GA4 获取的数据不准确,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68577919/

相关文章:

google-analytics - 反转多个交易 Google Management API?

google-analytics - Google Analytics(分析)的_trackEvent()无法正常工作吗?

google-analytics - Google Analytics(分析)目标:防止跟踪子文件夹的URL参数

google-analytics - 有没有办法提高API V4的指标限制?

firebase - Bigquery 中的 firebase/GA4 数据是否会追溯更改

google-analytics - ga :screenDepth in the GA4 data api? 相当于什么

google-analytics - ExpressionEngine 条件基于 Google Analytics URL 标签

google-analytics - Google Analytics API - 将行为与特定日期联系起来

php - 谷歌 api 分析 : error listManagementAccounts in HelloAnalytics. php

google-analytics - Google Analytics 4 事件参数