gpt4 book ai didi

google-analytics-4 - Google Analytics 4 Measurement Protocol 显示事件但没有用户

转载 作者:行者123 更新时间:2023-12-05 02:34:48 28 4
gpt4 key购买 nike

我想通过脚本(使用显式 HTTP 请求)使用 Google Analytics,并且了解带有 Measurement Protocol 的 Google Analytics 4 是可行的方法。我创建了一个新属性,添加了一个 Web 标签,并在那里为 Measurement Protocol 创建了一个 API key 。然后我发送这个请求:

{
"client_id": "Test-User",
"user_id": "test_user_id",
"events": [
{
"name": "MyEvent",
"params": {}
}
]
}

到此网址:https://www.google-analytics.com/mp/collect?measurement_id=G-LQDLGRLGZS&api_secret=JXGZ_CyvTt29ucNi9y0DkA

测量记录在报告的一角:

enter image description here

这些事件不会显示为用户。在报告中,我不太明白如何分析这些事件。有什么方法可以通过发送特殊事件来跟踪用户 session 吗?

最佳答案

我遇到了同样的问题,答案在这里 GA4 Measurement Protocol returns events not the users在 JSON 的事件分支下,当我添加“engagement_time_msec”:1开始统计用户。

"events" : [{
"name" : "SoftMeter_event",
"params" : {
"action" : "From UA-xxxxx [muted]",
"engagement_time_msec" : 1,
"label" : "SoftMeter-dev/v1.0.2/lib v1.4.4 DEBUG"
}
}],

The Measurement Protocol V4 is for GA4 properties(which is also theone you are using).

According to the official document:https://support.google.com/analytics/answer/9408920 It says "GoogleAnalytics 4 properties counts users who engaged with your app/site forany non-zero amount of time during the previous 30 minutes".

GA4 uses "engagement_time_msec" parameter to identify user interactiontime. This explains why you can see the number of events but not thenumber of users. If you want users sent from MP to be counted asactive user, simply add the "engagement_time_msec" parameter to yourevent.

关于google-analytics-4 - Google Analytics 4 Measurement Protocol 显示事件但没有用户,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70708893/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com