创作者数据分析 & API:了解你的应用表现
全新数据分析面板,包含用户互动指标、应用健康监控和趋势排名——还有完整的 API 支持 AI 工作流。
新功能
我们升级了创作者控制面板,新增了三个模块,并推出了公开 API,让你可以通过程序访问应用数据。
增强版控制面板
当你打开 控制台 > 数据分析 查看任何应用时,你会看到以下新内容:
趋势排名 — 查看你的应用热度分和在所有已发布应用中的排名。趋势算法综合考虑近期浏览量、运行量和用户互动来推荐最佳应用。
用户互动指标 — 除了浏览量和运行量,你现在还可以看到:
- 会话数:用户打开你的应用的次数
- 平均时长:用户在你的应用中花费的时间
- 回访用户:再次回来使用的用户数
应用健康 — 我们自动检测你的应用中的运行时错误(JavaScript 错误、网络故障等),并显示健康摘要:
- 绿色 = 最近 24 小时没有问题
- 黄色 = 检测到少量问题
- 红色 = 检测到较多问题
你可以展开健康模块查看按出现次数排序的主要错误,包括它们发生在哪个阶段(运行时、构建等)以及最后出现的时间。没有令人恐惧的堆栈跟踪——只有清晰、可操作的信息。
数据分析 API
你现在可以使用与发布应用相同的 个人访问令牌 通过 API 访问所有分析数据。如果你正在使用 AI 编码助手,这特别有用——将下方的 API 参考粘贴到你的 AI 助手上下文中,它就可以帮你监控应用。
获取 API 密钥: 前往 控制台 > 创作者工具,如果还没有发布密钥就创建一个。
快速开始
# 设置你的令牌
export GAPP_TOKEN="gapp_your_token_here"
# 获取所有应用概览
curl -H "Authorization: Bearer $GAPP_TOKEN" \
https://gapp.so/api/user/apps/stats
# 获取特定应用的详细分析
curl -H "Authorization: Bearer $GAPP_TOKEN" \
https://gapp.so/api/apps/my-app-slug/analytics?period=30d
# 检查应用错误
curl -H "Authorization: Bearer $GAPP_TOKEN" \
https://gapp.so/api/apps/my-app-slug/errors?time_range=7d各指标含义
| 指标 | 含义 |
|---|---|
| 浏览量 | 有人访问了你的应用落地页 |
| 运行量 | 有人实际打开并使用了你的应用 |
| 运行率 | 浏览后运行的比例(越高说明落地页越好) |
| 会话数 | 应用中的独立使用会话 |
| 平均时长 | 每次会话的平均使用时间 |
| 回访用户 | 再次回来使用的用户 |
| 热度分 | 基于近期活跃度的算法评分 |
| 健康状态 | 你的应用是否有运行错误 |
API 参考(供 AI 助手使用)
以下部分适合粘贴到 AI 助手上下文中(Claude、Cursor 等),用于程序化访问你的 gapp.so 应用分析数据。
认证
所有端点通过 Bearer 认证接受个人访问令牌:
Authorization: Bearer gapp_xxxxxxxx...令牌在 /dashboard/settings/creator-tools 创建。同一个令牌可用于发布和数据分析。
GET /api/user/apps/stats
获取你所有应用的概览。
响应:
{
"success": true,
"summary": {
"total_apps": 5,
"total_views": 12450,
"total_runs": 3200,
"views_today": 45,
"runs_today": 12,
"views_week": 890,
"runs_week": 234,
"views_month": 3400,
"runs_month": 890
},
"apps": [
{
"id": "uuid",
"slug": "my-app",
"title": "我的应用",
"status": "active",
"version": 3,
"views": 5000,
"runs": 1200,
"views_today": 20,
"runs_today": 5,
"trending_score": 42,
"trending_rank": 12,
"health_status": "healthy",
"errors_24h": 0,
"created_at": "2026-01-15T00:00:00.000Z",
"updated_at": "2026-03-18T00:00:00.000Z"
}
]
}GET /api/apps/{slug}/analytics
获取单个应用的详细分析数据。
查询参数:
| 参数 | 默认值 | 可选值 |
|---|---|---|
period | 30d | 7d, 30d, 90d, all |
响应:
{
"success": true,
"app": {
"id": "uuid",
"slug": "my-app",
"title": "我的应用",
"version": 3,
"status": "active",
"createdAt": "2026-01-15T00:00:00.000Z"
},
"summary": {
"total_views": 5000,
"total_runs": 1200,
"unique_views": 4000,
"unique_runs": 1000,
"avg_daily_views": 167,
"avg_daily_runs": 40,
"run_rate": 24
},
"trending": {
"score": 42,
"rank": 12,
"total_ranked": 456
},
"engagement": {
"total_sessions": 890,
"unique_users": 650,
"avg_duration": 165,
"median_duration": 120,
"returning_users": 89
},
"timeseries": [
{
"date": "2026-03-01",
"views": 150,
"runs": 40,
"unique_views": 120,
"unique_runs": 35
}
],
"referrers": [
{ "source": "Direct", "views": 2500, "percentage": 50 },
{ "source": "google.com", "views": 1000, "percentage": 20 }
],
"registrations": {
"total": 45,
"last7d": 5,
"last30d": 18,
"conversion_rate": 1.13
},
"health": {
"status": "healthy",
"errors_24h": 0,
"errors_7d": 2,
"top_errors": [
{
"message": "Cannot read property 'x' of undefined",
"error_code": "CLIENT_JS_ERROR",
"phase": "runtime_client",
"severity": "error",
"occurrence_count": 2,
"last_seen_at": "2026-03-17T10:30:00.000Z"
}
]
},
"period": "30d"
}GET /api/apps/{slug}/errors
获取单个应用的错误列表(隐私安全——不包含用户 ID 或堆栈跟踪)。
查询参数:
| 参数 | 默认值 | 可选值 |
|---|---|---|
phase | 全部 | runtime_client, runtime_server, build, upload, storage |
severity | 全部 | error, warning, info |
time_range | 7d | 24h, 7d, 30d, all |
limit | 20 | 最大 50 |
offset | 0 | — |
响应:
{
"success": true,
"app": { "id": "uuid", "slug": "my-app", "title": "我的应用" },
"errors": [
{
"id": "error-uuid",
"phase": "runtime_client",
"severity": "error",
"error_code": "CLIENT_JS_ERROR",
"message": "Cannot read property 'x' of undefined",
"occurrence_count": 8,
"first_seen_at": "2026-03-15T08:00:00.000Z",
"last_seen_at": "2026-03-19T14:30:00.000Z",
"resolved_at": null
}
],
"stats": {
"total_unresolved": 3,
"last_24h": 1,
"last_7d": 5,
"by_phase": { "runtime_client": 3 },
"by_severity": { "error": 2, "warning": 1 }
},
"pagination": {
"total": 3,
"limit": 20,
"offset": 0,
"has_more": false
}
}错误代码
| 代码 | HTTP | 含义 |
|---|---|---|
AUTH_REQUIRED | 401 | 缺少或无效的令牌 |
FORBIDDEN | 403 | 应用属于其他创作者 |
NOT_FOUND | 404 | 未找到应用 |
VALIDATION_ERROR | 400 | 无效的查询参数 |
INTERNAL_ERROR | 500 | 服务器错误 |
AI 助手工作流示例
"检查我的应用是否有错误":
curl -s -H "Authorization: Bearer $GAPP_TOKEN" \
https://gapp.so/api/user/apps/stats | \
jq '.apps[] | select(.health_status != "healthy") | {slug, health_status, errors_24h}'"获取本周表现最好的应用":
curl -s -H "Authorization: Bearer $GAPP_TOKEN" \
https://gapp.so/api/user/apps/stats | \
jq '.apps | sort_by(-.views_today) | .[0] | {slug, title, views_today, trending_rank}'"查看特定应用的错误":
curl -s -H "Authorization: Bearer $GAPP_TOKEN" \
https://gapp.so/api/apps/my-app/errors?time_range=24h | \
jq '.errors[] | {message, phase, occurrence_count, last_seen_at}'