Google analytics 通过API访问Google Analytics,但webProperties为空

Google analytics 通过API访问Google Analytics,但webProperties为空,google-analytics,google-analytics-api,google-analytics-4,Google Analytics,Google Analytics Api,Google Analytics 4,我期待通过API访问我的GA帐户时出现问题。 从响应中可以看到,如果我拥有所有活动的权限和作用域,那么实体webProperties也是空的 { "kind": "analytics#accountSummaries", "username": "fabio@librafactory.tech", "totalResults": 1, "startIndex":

我期待通过API访问我的GA帐户时出现问题。 从响应中可以看到,如果我拥有所有活动的权限和作用域,那么实体webProperties也是空的

{
  "kind": "analytics#accountSummaries",
  "username": "fabio@librafactory.tech",
  "totalResults": 1,
  "startIndex": 1,
  "itemsPerPage": 1000,
  "items": [
    {
      "id": "183028779",
      "kind": "analytics#accountSummary",
      "name": "Libra Factory B.V.",
      "webProperties": []
    }
  ]
}
同时使用它只显示帐户,不显示属性。作为Google Workplace组织的帐户部分,是否需要在组织面板中启用任何东西来启用Google API

提前感谢您的帮助。
Fabio

web属性为空,因为您的帐户是GA4,而不是universal analytics。Ga4帐户没有web属性

您还使用来自管理api的account summaries调用,该调用用于universal analytics,而不是GA4

您应该尝试使用设计用于Ga4帐户的

GET https://analyticsadmin.googleapis.com/v1alpha/accountSummaries

非常感谢@dalmtoi如果这封信帮助你记住接受它,你会得到分数。