[英]Number of dimensions allowed in GA4 data API
While going through the new GA4 data API documentation, I didn't come across any specification for the number of dimensions allowed in a single request.在浏览新的 GA4 数据 API 文档时,我没有遇到任何关于单个请求中允许的维度数量的规范。 It seemed like there was no upper limit.
好像没有上限。 This document doesn't mention an upper limit and states the following: “In a report request, you can specify zero or more dimensions.”
该文档未提及上限,并声明如下:“在报告请求中,您可以指定零个或多个维度。”
However when I try executing the v1alpha:runReport API via postman I get this response if I give more than 8 dimensions:但是,当我尝试通过 postman 执行 v1alpha:runReport API 时,如果我给出超过 8 个维度,我会收到此响应:
{
"error": {
"code": 400,
"message": "Requests are limited to 8 dimensions within a nested request.\n This request is for 9 dimensions.",
"status": "INVALID_ARGUMENT"
}
}
Has the number of dimensions allowed in a request been reduced to 8?请求中允许的维度数量是否已减少到 8 个? If yes, can you point me to some document that states this?
如果是的话,你能给我指出一些说明这一点的文件吗? The earlier UA batchGet API used to allow max 9 dimensions and I was expecting the same limit with the new GA4 data API.
较早的 UA batchGet API 曾经允许最多 9 个维度,我期望新的 GA4 数据 API 具有相同的限制。
Steps to Reproduce: Post a request to v1alpha:runReport with more than 8 dimensions:重现步骤:向 v1alpha:runReport 发布超过 8 个维度的请求:
Request URL: https://analyticsdata.googleapis.com/v1alpha:runReport请求 URL: https://analyticsdata.googleapis.com/v1alpha:runReport
Request Auth: A valid bearer token请求身份验证:有效的不记名令牌
Request Body:请求正文:
{
"entity":{
"propertyId":"123456789"
},
"dateRanges":[
{
"startDate":"2021-03-29",
"endDate":"2021-03-29"
}
],
"dimensions":[
{
"name":"eventName"
},
{
"name":"source"
},
{
"name":"medium"
},
{
"name":"hostname"
},
{
"name":"dateHour"
},
{
"name":"deviceCategory"
},
{
"name":"browser"
},
{
"name":"city"
},
{
"name":"country"
}
],
"metrics":[
{
"name":"screenPageViews"
},
{
"name":"userEngagementDuration"
},
{
"name":"eventCount"
}
]
} }
The Google analytics GA4 data api is a brand new api, released as part of GA4.谷歌分析GA4 数据 api是全新的 api,作为 GA4 的一部分发布。 As such it has not been reduced to 8 dimensions this is the current limit as it stands
因此,它没有减少到 8 个维度,这是目前的限制
Requests are limited to 8 dimensions within a nested request.
嵌套请求中的请求限制为 8 个维度。
The Google analytics reporting api may allow for additional dimensions and metrics but they are it's a completely different system.谷歌分析报告 api 可能允许额外的维度和指标,但它们是一个完全不同的系统。 You can't compare universal analytics and GA4
您无法比较通用分析和 GA4
Note: i have submitted a note about the lack of documentation to the team注意:我已向团队提交了关于缺少文档的说明
Updated docs state up to 9 dimensions are now allowed.更新的文档 state 现在允许多达 9 个维度。
https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimensions https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimensions
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.