posthog-analytics
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePostHog Analytics Expert
PostHog 产品分析专家
Transform PostHog data into actionable product insights. This skill combines product analytics expertise with the PostHog MCP server to help discover patterns, surface opportunities, and build a data-informed product strategy.
将PostHog数据转化为可落地的产品洞察。该技能结合了产品分析专业知识与PostHog MCP服务器,帮助发现数据规律、挖掘机会,并构建基于数据的产品策略。
Product Context Management
产品上下文管理
Before diving into analysis, establish product context. Store discovered knowledge in for persistence across sessions.
.claude/product-context.md在开始分析之前,先建立产品上下文。将发现的信息存储在中,以便在不同会话中持续使用。
.claude/product-context.mdFirst Session: Discovery
首次会话:发现阶段
- Check for existing context: Read if it exists
.claude/product-context.md - Interview the user (if context is missing or incomplete):
- What does the product do? Who are the users?
- What are the key user actions/conversions?
- What business metrics matter most?
- Explore PostHog data:
- - Discover tracked events
event-definitions-list - - Understand available properties
properties-list - - See existing insights
insights-get-all - - Review current dashboards
dashboards-get-all
- Save context: Write discovered knowledge to
.claude/product-context.md
- 检查现有上下文:如果存在文件,请先读取
.claude/product-context.md - 用户访谈(如果上下文缺失或不完整):
- 产品的功能是什么?目标用户是谁?
- 关键的用户行为/转化事件有哪些?
- 最重要的业务指标是什么?
- 探索PostHog数据:
- - 发现已跟踪的事件
event-definitions-list - - 了解可用的属性
properties-list - - 查看现有洞察
insights-get-all - - 审阅当前仪表盘
dashboards-get-all
- 保存上下文:将发现的信息写入
.claude/product-context.md
Context File Structure
上下文文件结构
markdown
undefinedmarkdown
undefinedProduct Context
Product Context
Product Overview
Product Overview
[What the product does, target users]
[What the product does, target users]
Key Events
Key Events
| Event | Meaning | Importance |
|---|---|---|
| $pageview | Page visit | Navigation tracking |
| signup_completed | User registered | Core conversion |
| [custom events discovered] |
| Event | Meaning | Importance |
|---|---|---|
| $pageview | Page visit | Navigation tracking |
| signup_completed | User registered | Core conversion |
| [custom events discovered] |
Important Properties
Important Properties
- user_tier: free/pro/enterprise
- [other key properties]
- user_tier: free/pro/enterprise
- [other key properties]
Key Metrics
Key Metrics
- Primary: [e.g., Weekly Active Users, Conversion Rate]
- Secondary: [e.g., Feature Adoption, Retention]
- Primary: [e.g., Weekly Active Users, Conversion Rate]
- Secondary: [e.g., Feature Adoption, Retention]
Funnels
Funnels
- Activation: signup → onboarding_complete → first_value_action
- [other key funnels]
- Activation: signup → onboarding_complete → first_value_action
- [other key funnels]
Last Updated: [date]
Last Updated: [date]
undefinedundefinedCore Capabilities
核心能力
1. Proactive Insight Discovery
1. 主动洞察发现
When asked to "find insights" or "what's interesting", run this discovery workflow:
1. Trends Analysis
- query-run: Total events over 30 days (spot volume changes)
- query-run: DAU/WAU/MAU trends (engagement health)
- query-run: Key conversion events over time
2. Funnel Health
- query-run: Core activation funnel
- query-run: Conversion funnel (trial → paid if SaaS)
- Look for: Drop-off points, conversion changes
3. Retention Check
- query-run: Cohort retention (week-over-week)
- Look for: Retention curve shape, changes over time
4. Feature Adoption
- query-run: Feature usage by user segment
- Look for: Underused features, power user patterns
5. Error Impact
- list-errors: Top errors by occurrence
- error-details: Impact on user journeysInsight Presentation Format:
undefined当被要求“寻找洞察”或“有什么值得关注的点”时,执行以下发现流程:
1. 趋势分析
- query-run: 过去30天的总事件数(发现数量变化)
- query-run: DAU/WAU/MAU趋势(参与度健康度)
- query-run: 关键转化事件随时间的变化
2. 漏斗健康度
- query-run: 核心激活漏斗
- query-run: 转化漏斗(如果是SaaS产品则为试用→付费)
- 关注:流失节点、转化变化
3. 留存检查
- query-run: 群组留存(周环比)
- 关注:留存曲线形状、随时间的变化
4. 功能采用率
- query-run: 按用户细分的功能使用情况
- 关注:未充分使用的功能、核心用户使用模式
5. 错误影响
- list-errors: 按发生次数排序的顶级错误
- error-details: 对用户旅程的影响洞察呈现格式:
undefined[Insight Title]
[洞察标题]
Finding: [One sentence summary]
Evidence: [Specific numbers/data]
Impact: [Why this matters]
Recommended Action: [What to do about it]
undefined发现: [一句话总结]
证据: [具体数据/数字]
影响: [为什么这很重要]
建议行动: [应该采取什么措施]
undefined2. Answering Analytics Questions
2. 解答分析类问题
Map common questions to PostHog queries:
| Question Pattern | Approach |
|---|---|
| "How many users..." | |
| "What % convert..." | |
| "Where do users drop off..." | FunnelsQuery → analyze step-by-step conversion |
| "Which feature is most used..." | TrendsQuery with breakdown by feature/event |
| "How is X changing over time..." | TrendsQuery with |
| "Who are our power users..." | TrendsQuery with breakdown by user property |
| "What's causing errors..." | |
将常见问题映射到PostHog查询:
| 问题模式 | 处理方法 |
|---|---|
| "有多少用户..." | 使用TrendsQuery的 |
| "有多少比例的用户完成转化..." | 使用FunnelsQuery的 |
| "用户在哪个环节流失..." | FunnelsQuery → 逐步分析转化情况 |
| "哪个功能的使用率最高..." | 按功能/事件细分的TrendsQuery |
| "X指标随时间如何变化..." | 使用 |
| "我们的核心用户是哪些人..." | 按用户属性细分的TrendsQuery |
| "错误的原因是什么..." | |
3. Dashboard Creation
3. 仪表盘创建
When building dashboards, follow this structure:
Executive Dashboard (high-level health):
- Active users (DAU/WAU/MAU)
- Core conversion rate
- Retention (week 1, week 4)
- Revenue metrics (if applicable)
Product Dashboard (feature-level):
- Feature adoption rates
- Feature engagement depth
- User journey completion
- Error rates by feature
Growth Dashboard (acquisition/activation):
- Signup funnel
- Activation funnel
- Traffic sources (if tracked)
- Onboarding completion
Workflow:
- with descriptive name
dashboard-create - Build insights with →
query-runinsight-create-from-query - Add to dashboard with
add-insight-to-dashboard - Organize with
dashboard-reorder-tiles
创建仪表盘时,遵循以下结构:
高管仪表盘(高层健康度):
- 活跃用户数(DAU/WAU/MAU)
- 核心转化率
- 留存率(第1周、第4周)
- 收入指标(如果适用)
产品仪表盘(功能层面):
- 功能采用率
- 功能参与深度
- 用户旅程完成率
- 按功能划分的错误率
增长仪表盘(获客/激活):
- 注册漏斗
- 激活漏斗
- 流量来源(如果有跟踪)
- 引导流程完成率
工作流程:
- 使用描述性名称执行
dashboard-create - 通过构建洞察 →
query-runinsight-create-from-query - 使用添加到仪表盘
add-insight-to-dashboard - 使用进行布局整理
dashboard-reorder-tiles
4. Experiment Design
4. 实验设计
When setting up A/B tests:
- Clarify hypothesis: What change, expected impact, and why
- Find existing flags: (reuse if appropriate)
feature-flag-get-all - Choose metrics: Use to find trackable events
event-definitions-list - Set up experiment: with:
experiment-create- Clear name and description
- Primary metric (what you're optimizing)
- Secondary metrics (guardrails)
- Appropriate sample size (MDE guidance)
See references/experiments.md for detailed experiment patterns.
设置A/B测试时:
- 明确假设:要做什么改变、预期影响以及原因
- 查找现有标志:(如果合适则复用)
feature-flag-get-all - 选择指标:使用找到可跟踪的事件
event-definitions-list - 设置实验:使用,包含:
experiment-create- 清晰的名称和描述
- 主要指标(你要优化的目标)
- 次要指标(保障指标)
- 合适的样本量(参考MDE指南)
请查看references/experiments.md获取详细的实验模式。
5. Cohort & Segment Analysis
5. 群组与细分分析
For understanding user segments:
1. Define cohort criteria (user properties, behaviors)
2. Compare cohorts on key metrics:
- query-run with breakdownFilter by cohort property
- Conversion rates per segment
- Retention per segment
3. Identify highest-value segments
4. Recommend targeting strategies用于理解用户细分群体:
1. 定义群组标准(用户属性、行为)
2. 比较不同群组的关键指标:
- 按群组属性使用breakdownFilter的`query-run`
- 各细分群体的转化率
- 各细分群体的留存率
3. 识别高价值细分群体
4. 推荐针对性策略Query Patterns
查询模式
TrendsQuery (counts over time)
TrendsQuery(随时间变化的计数)
json
{
"kind": "InsightVizNode",
"source": {
"kind": "TrendsQuery",
"dateRange": {"date_from": "-30d"},
"interval": "day",
"series": [{
"kind": "EventsNode",
"event": "event_name",
"custom_name": "Display Name",
"math": "total"
}]
}
}Math options: , , , , , , , ,
totaldauweekly_activemonthly_activeunique_sessionavgsumminmaxjson
{
"kind": "InsightVizNode",
"source": {
"kind": "TrendsQuery",
"dateRange": {"date_from": "-30d"},
"interval": "day",
"series": [{
"kind": "EventsNode",
"event": "event_name",
"custom_name": "Display Name",
"math": "total"
}]
}
}数学选项:, , , , , , , ,
totaldauweekly_activemonthly_activeunique_sessionavgsumminmaxFunnelsQuery (conversion analysis)
FunnelsQuery(转化分析)
json
{
"kind": "InsightVizNode",
"source": {
"kind": "FunnelsQuery",
"dateRange": {"date_from": "-30d"},
"series": [
{"kind": "EventsNode", "event": "step_1", "custom_name": "Step 1"},
{"kind": "EventsNode", "event": "step_2", "custom_name": "Step 2"},
{"kind": "EventsNode", "event": "step_3", "custom_name": "Step 3"}
],
"funnelsFilter": {
"funnelWindowInterval": 7,
"funnelWindowIntervalUnit": "day"
}
}
}json
{
"kind": "InsightVizNode",
"source": {
"kind": "FunnelsQuery",
"dateRange": {"date_from": "-30d"},
"series": [
{"kind": "EventsNode", "event": "step_1", "custom_name": "Step 1"},
{"kind": "EventsNode", "event": "step_2", "custom_name": "Step 2"},
{"kind": "EventsNode", "event": "step_3", "custom_name": "Step 3"}
],
"funnelsFilter": {
"funnelWindowInterval": 7,
"funnelWindowIntervalUnit": "day"
}
}
}Breakdown Analysis
细分分析
Add to any query:
json
"breakdownFilter": {
"breakdown": "property_name",
"breakdown_type": "event" // or "person"
}添加到任意查询中:
json
"breakdownFilter": {
"breakdown": "property_name",
"breakdown_type": "event" // or "person"
}SaaS Metrics Framework
SaaS指标框架
For SaaS products, prioritize these metrics:
| Metric | Query Approach | Why It Matters |
|---|---|---|
| Activation Rate | Funnel: signup → key_action | Validates onboarding |
| DAU/MAU Ratio | Trends: DAU ÷ MAU | Engagement stickiness |
| Feature Adoption | Trends: feature_used by user | Product-market fit signals |
| Retention (D7, D30) | Cohort retention query | Long-term value predictor |
| Conversion (Trial→Paid) | Funnel: trial_start → subscription | Revenue health |
| Expansion Revenue | Trends: upgrade events | Growth efficiency |
| Churn Indicators | Declining usage patterns | Early warning system |
对于SaaS产品,优先关注以下指标:
| 指标 | 查询方法 | 重要性 |
|---|---|---|
| 激活率 | 漏斗:注册 → 关键行为 | 验证引导流程有效性 |
| DAU/MAU比率 | 趋势:DAU ÷ MAU | 反映用户参与粘性 |
| 功能采用率 | 趋势:按用户划分的功能使用情况 | 产品市场契合度信号 |
| 留存率(D7, D30) | 群组留存查询 | 长期价值预测指标 |
| 转化率(试用→付费) | 漏斗:试用开始 → 订阅 | 收入健康度指标 |
| 扩展收入 | 趋势:升级事件 | 增长效率指标 |
| 流失预警 | 使用率下降模式 | 早期预警系统 |
Resources
资源
- references/experiments.md - Detailed experiment design patterns
- references/saas-playbook.md - SaaS-specific analytics strategies
- references/experiments.md - 详细的实验设计模式
- references/saas-playbook.md - SaaS专属分析策略