【发布时间】:2015-07-24 01:52:17
【问题描述】:
在 Google Analytics 中,我们可以创建如下细分:
从Google Analytics API explorer,我们可以通过segment id或者它的code来拉取segment信息:
我假设我们可以像处理所有其他参数一样将该代码剪切并粘贴到谷歌分析核心报告 v3 参考代码中:
然而,当我运行代码时,我得到了这个错误:
Arg, there was an API error : 400 : Invalid value 'users::condition::dateOfSession==2015-04-30;ga:sessionCount==1;condition::ga:campaign=@33100;sessions::condition::ga:userType=@Returning Visitor'
for segment parameter.
我不确定可能出了什么问题。当我在段参数的代码中使用段 id 代替时(段 ='gaid::xxxxxxx'),我收到此错误:
Arg, there was an API error : 400 : Segment XXXXXXXXXXX is not supported in the API.
不知道我应该如何构建代码。
【问题讨论】:
标签: google-api google-analytics-api google-api-python-client