【发布时间】:2015-08-10 12:56:59
【问题描述】:
无法在维度和指标资源管理器中找到同类群组维度或用户获取日期以将数据输入 Google Script .gs (https://developers.google.com/analytics/devguides/reporting/core/dimsmets)
【问题讨论】:
标签: analytics google-analytics-api
无法在维度和指标资源管理器中找到同类群组维度或用户获取日期以将数据输入 Google Script .gs (https://developers.google.com/analytics/devguides/reporting/core/dimsmets)
【问题讨论】:
标签: analytics google-analytics-api
你应该尝试使用dateOfSession<> segment notation:
segment=users::sequence::^ga:sessionCount==1;dateOfSession<>2014-05-20_2014-05-30;->>ga:sessionDurationBucket>600
上述部分将为您提供在 2014 年 5 月 20 日至 2014 年 5 月 30 日期间进行了首次会话并且在网站上停留时间超过 600 秒的用户。
2016 年 4 月更新
截至 2016 年 4 月,随着 Analytics Reporting API V4 的发布,现在可以通过直接查询 API 来创建 cohort 报告:
POST https://analyticsreporting.googleapis.com/v4/reports:batchGet
{
"reportRequests": [
{
"viewId": "XXXX",
"dimensions": [
{"name": "ga:cohort" },
{"name": "ga:cohortNthWeek" }],
"metrics": [
{"expression": "ga:cohortActiveUsers"}
],
"cohortGroup": {
"cohorts": [{
"name": "cohort 1",
"type": "FIRST_VISIT_DATE",
"dateRange": {
"startDate": "2015-08-01",
"endDate": "2015-09-01"
}
},
{
"name": "cohort 2",
"type": "FIRST_VISIT_DATE",
"dateRange": {
"startDate": "2015-07-01",
"end_date": "2015-08-01"
}
}],
}
}]
}
文档包含各种语言的samples。
注意生命周期值查询("lifetimeValue": True 和所有ga:acquisition... 维度)很重要,如Analytics Help Center 中所述,只能查询App Views
【讨论】:
dateOfSession<> 段符号。