gpt4 book ai didi

java - 谷歌分析 java include-empty-rows

转载 作者:行者123 更新时间:2023-11-30 03:08:04 25 4
gpt4 key购买 nike

我读到有关谷歌分析 API 并尝试使用此选项

"include-empty-rows"

在此linkthis one

但我收到此错误消息

<br>Caused by: com.google.api.client.googleapis.json.GoogleJsonResponseException: 400 Bad Request
<br>{
<br> "code" : 400,
<br> "errors" : [ {
<br> "domain" : "global",
<br> "message" : "Invalid dimension or metric: ga:include-empty-rows",
<br> "reason" : "badRequest"
<br> } ],
<br> "message" : "Invalid dimension or metric: ga:include-empty-rows"

谁能告诉我如何使用此选项进行谷歌分析?

甚至在查询中也尝试过:

query.include-empty-rows

但是构建器中没有方法可以使用此参数

最佳答案

include-empty-rows=true

Optional.Defaults to true; if set to false, rows without data will be omitted from the response. This can be useful when making a request where it is expected that the number of valid rows is much smaller then the number of expected dimension values.

这是您添加到请求末尾的参数。

请求示例

https://www.googleapis.com/analytics/v3/data/ga?ids=ga:78110423&dimensions=ga:date,ga:userType,ga:deviceCategory&metrics=ga:users&start-date=2014-10-01&end-date=2015-12-01&start-index=501&max-results=500&access_token=XXXXXX&quotaUser=d91875d9-cbeb-455a-9a72-9a130809ff1b

包含空行的请求示例

https://www.googleapis.com/analytics/v3/data/ga?ids=ga:78110423&dimensions=ga:date,ga:userType,ga:deviceCategory&metrics=ga:users&start-date=2014-10-01&end-date=2015-12-01&start-index=501&max-results=500&access_token=XXXXXX&quotaUser=d91875d9-cbeb-455a-9a72-9a130809ff1b&include-empty-rows=true

答案:

您将 include-empty-rows=true 添加到您的请求中,您似乎尝试将其作为维度或指标发送。

关于java - 谷歌分析 java include-empty-rows,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34261907/

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