繁体   English   中英

如何在 Google Analytics 4 (GA4) 中填写 Tech Overview 数据?

[英]How to fill the Tech Overview data in Google Analytics 4 (GA4)?

我正在使用 GA4 Measurement Protocol 记录来自 Roku 应用程序的事件。 这不是 web 或 Android/iOS 应用程序,也没有适用于 GA4 的 SDK,因此我需要以与从服务器相同的方式记录事件:HTTP 使用 Measurement Protocol 的请求,就好像我在我的应用程序中安装了 gtag 一样。

如果我 go 在我的资产仪表板中转到Reports > Tech > Tech overview ,我会看到如下指标:

  • 平台用户
  • 操作系统用户
  • 按设备类别分类的用户
  • 应用版本用户
  • 设备用户 Model

我不知道如何使用GA4 的 Measurement Protocol填充这些值。 到目前为止,我的请求看起来像这样

POST /mp/collect HTTP/1.1
HOST: www.google-analytics.com
Content-Type: application/json

查询参数:

api_secret: XXXX
measurement_id: XXXX

请求正文

{
    "client_id": "some random id because i don't actually have a gtag to generate it",
    "user_id": "a unique id generated by the device",
    "non_personalized_ads": false,
    "user_properties": {
        "device_id": {
            "value": "same as user_id, just to have it as a user property"
        }
    },
    "events": [
        {
            "name": "custom_event1",
            "params": {

                "engagement_time_msec": "1", // need to have this as > 0 otherwise it GA4 won't show the user
                "session_id": "another random id generated by the device so that i can start a session",
                "param1": "xyz"
            }
        }
    ]
}

为了按操作系统表填充用户,我在其他帖子中读到我应该使用ua查询参数,但它不适用于我发送到后端的这个值: Roku/DVP-11.0 (11.0.0.4184-AE)

尝试在请求标头中设置以下参数。 示例请求标头

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM