如何修复 "Error in ParseDataFeedJSON(GA.Data) : code : 400 Reason : Invalid expression. Expression exceeds max size of 4096"

how to fix "Error in ParseDataFeedJSON(GA.Data) : code : 400 Reason : Invalid expression. Expression exceeds max size of 4096"

我正在尝试通过 R

从 google 分析 api 获取事件标签

我尝试减少 Init() 函数中 max.results 的数量。我仍然不断收到错误

# get eventLabel which is a unique video ID of the video on the website.
query.list <- Init(startDate,
                   endDate,
                   dimensions = "ga:eventLabel",
                   metrics = "ga:totalEvents",
                   filters = reportFiltersCOVE,
                   max.results = 10000,
                   table.id = tableID_events)
# run query
ga.query <- QueryBuilder(query.list)
# save data for google analytics in data.nko.COVE
data.nko.COVE <- GetReportData(ga.query,
                               gaOAuth_token)

我收到以下错误

"Error in ParseDataFeedJSON(GA.Data) :    code : 400 Reason : Invalid expression. Expression exceeds max size of 4096"

当我运行最后一段代码

data.nko.COVE <- GetReportData(ga.query,
                               gaOAuth_token)

我需要帮助来理解此错误的含义以及如何修复它?

非常感谢任何帮助

我猜这个错误是指过滤器表达式的字符串长度。

我觉得如果算上'reportFiltersCOVE'的字符数会超过4096的长度

但是我找不到任何关于过滤字段限制的文档。 https://developers.google.com/analytics/devguides/reporting/core/v3/reference#filter

你能用更短的过滤器表达式再试一次吗?