gpt4 book ai didi

analytics - 谷歌分析 : Is there any way to create the Cohort Analysis report using the Analytics API?

转载 作者:行者123 更新时间:2023-12-03 07:58:01 27 4
gpt4 key购买 nike

无法在维度和指标资源管理器中找到同类群组维度或用户获取日期以将数据馈送到 Google Script .gs ( https://developers.google.com/analytics/devguides/reporting/core/dimsmets )

最佳答案

您应该尝试使用 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 日之间进行第一次 session 并且在网站上停留超过 600 秒的用户。

2016 年 4 月更新

截至 2016 年 4 月,随着 Analytics Reporting API V4 的发布现在可以创建 cohort通过直接查询 API 来报告:

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各种语言。

请务必注意生命周期值(value)查询("lifetimeValue": True 和所有 ga:acquisition... 维度),如 Analytics Help Center 中所述, 只能查询App Views

关于analytics - 谷歌分析 : Is there any way to create the Cohort Analysis report using the Analytics API?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31920220/

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