关于 product-analytics
面向产品团队的产品分析指南,提供指标框架、事件命名与实验原则,并强调隐私保护和统计严谨性。
主要功能
- 01以业务结果为导向的指标
- 02无个人信息的事件设计
- 03object_action snake_case 命名
- 04North Star 与 AARRR 框架
- 05实验的样本量与显著性要求
适用场景
- 01定义产品的 North Star 指标
- 02规划 AARRR 生命周期分析
- 03设计隐私友好的埋点事件
- 04评估 A/B 测试结果
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ majiayu000/ spellbook --skill product-analytics安装后在 Claude Code 中输入/product-analytics确认已加载。
包含的文件
除 SKILL.md 外,安装时一起下载的参考资料和脚本。
reference/event-tracking.mdexperimentation.mdextended.mdmetrics-framework.mdretention.mdtemplates/tracking-plan.md详细介绍
产品分析
核心原则
- 重视指标,而非虚荣指标 — 聚焦与业务成果相关且可采取行动的指标
- 数据驱动决策 — 提出假设、衡量、学习、迭代
- 以用户为中心进行衡量 — 跟踪用户行为,而不只是页面浏览量
- 严谨的统计方法 — 理解统计显著性,避免假阳性
- 隐私优先 — 尊重用户数据,遵守 GDPR/CCPA
- 聚焦北极星指标 — 让所有团队围绕一个关键指标保持一致
硬性规则(必须遵守)
以下规则为强制要求。违反这些规则意味着此技能无法正常工作。
事件中不得包含个人身份信息
事件绝不能包含个人身份信息。
// ❌ FORBIDDEN: PII in event properties
track('user_signed_up', {
email: '[email protected]', // PII!
name: 'John Doe', // PII!
phone: '+1234567890', // PII!
ip_address: '192.168.1.1', // PII!
credit_card: '4111...', // NEVER!
});
// ✅ REQUIRED: Anonymized/hashed identifiers only
track('user_signed_up', {
user_id: hash('[email protected]'), // Hashed
plan: 'pro',
source: 'organic',
country: 'US', // Broad location OK
});
// Masking utilities
const maskEmail = (email) => {
const [name, domain] = email.split('@');
return `${name[0]}***@${domain}`;
};
对象_动作事件命名
所有事件名称都必须遵循 object_action 蛇形命名格式。
// ❌ FORBIDDEN: Inconsistent naming
track('signup'); // No object
track('newProject'); // camelCase
track('Upload File'); // Spaces and PascalCase
track('user-created'); // kebab-case
track('BUTTON_CLICKED'); // SCREAMING_CASE
// ✅ REQUIRED: object_action snake_case
track('user_signed_up');
track('project_created');
track('file_uploaded');
track('payment_completed');
track('checkout_started');
只跟踪可采取行动的指标
跟踪能够推动决策的指标,而非虚荣指标。
// ❌ FORBIDDEN: Vanity metrics without context
track('page_viewed'); // No insight
track('button_clicked'); // Too generic
track('app_opened'); // Doesn't indicate value
// ✅ REQUIRED: Actionable metrics tied to outcomes
track('feature_activated', {
feature: 'dark_mode',
time_to_activation_hours: 2.5,
user_segment: 'power_user',
});
track('checkout_completed', {
order_value: 99.99,
items_count: 3,
payment_method: 'credit_card',
coupon_applied: true,
});
实验须采用严谨的统计方法
A/B 测试必须具备适当的样本量和显著性阈值。
// ❌ FORBIDDEN: Drawing conclusions too early
// "After 100 users, variant B has 5% higher conversion!"
// This is not statistically significant.
// ✅ REQUIRED: Proper experiment setup
const experimentConfig = {
name: 'new_checkout_flow',
hypothesis: 'New flow increases conversion by 10%',
// Statistical requirements
significance_level: 0.05, // 95% confidence
power: 0.80, // 80% power
minimum_detectable_effect: 0.10, // 10% lift
// Calculated sample size
sample_size_per_variant: 3842,
// Guardrails
max_duration_days: 14,
stop_if_degradation: -0.05, // Stop if 5% worse
};
快速参考
如何选择
| 场景 | 框架/工具 | 关键指标 |
|---|---|---|
| 整体产品健康度 | 北极星指标 | 聆听时长(Spotify)、预订晚数(Airbnb) |
| 增长优化 | AARRR(海盗指标) | 各阶段转化率 |
| 功能验证 | A/B 测试 | 统计显著性(p < 0.05) |
| 用户参与度 | 队列分析 | 第 1/7/30 天留存率 |
| 转化优化 | 漏斗分析 | 各步骤流失率 |
| 功能影响 | 归因建模 | 多触点归因 |
| 实验成功与否 | 统计检验 | 检验效能、显著性、效应量 |
北极星指标
定义
北极星指标是最能体现产品为客户创造的核心价值的一个指标。当这一指标持续增长时,业务就能取得成功。
优秀 NSM 的特征
✓ Captures product value delivery
✓ Correlates with revenue/growth
✓ Measurable and trackable
✓ Movable by product/engineering
✓ Understandable by entire org
✓ Leading (not lagging) indicator
各公司的示例
| 公司 | 北极星指标 | 有效原因 |
|---|---|---|
| Spotify | 聆听时长 | 核心价值 = 享受音乐 |
| Airbnb | 预订晚数 | 推动收入 + 交付价值 |
| Slack | 日活跃团队数 | 参与度 = 产品黏性 |
| 月活跃用户数 | 网络效应的基础 | |
| Amplitude | 每周获得洞察的用户数 | 价值 = 分析洞察 |
| Dropbox | 分享文件的活跃用户数 | 核心产品行为 |
NSM 框架
North Star Metric
↓
┌──────┴──────┬──────────┬──────────┐
│ │ │ │
Input 1 Input 2 Input 3 Input 4
(Supporting metrics that drive NSM)
Example: Spotify
NSM: Time Spent Listening
├── Daily Active Users
├── Playlists Created
├── Songs Added to Library
└── Share/Social Actions
如何定义 NSM
-
确定核心价值主张
- 你的产品为用户完成什么任务?
- 用户何时获得“顿悟”时刻?
-
找到能代表这一价值的指标
- 完成交易?(例如:预订晚数)
- 参与时长?(例如:聆听时长)
- 创建内容?(例如:发送的消息数)
-
验证它与业务成功之间的相关性
- NSM 上升 → 收入会上升吗?
- 产品改动能推动这一指标吗?
-
定义辅助输入指标
- 哪些用户行为会推动 NSM?
- 将其拆分为 3–5 个关键输入指标
AARRR 框架(海盗指标)
概览
AARRR 框架跟踪客户生命周期中的五个阶段:
ACQUISITION → ACTIVATION → RETENTION → REFERRAL → REVENUE
阶段定义
1. 获客
用户发现产品的阶段
关键问题:
- 用户来自哪里?
- 哪些渠道带来的用户质量最高?
- 单次获客成本(CPA)是多少?
指标:
• Website visitors
• App installs
• Sign-ups per channel
• Cost per acquisition (CPA)
• Channel conversion rates
事件示例:
// Landing page view
track('page_viewed', {
page: 'landing',
utm_source: 'google',
utm_medium: 'cpc',
utm_campaign: 'brand_search'
});
// Sign-up started
track('signup_started', {
source: 'homepage_cta'
});
2. 激活
用户体验到产品核心价值的阶段
关键问题:
- “顿悟”时刻是什么?
- 首次获得价值需要多久?
- 有多少用户完成激活?
指标:
• Time to first action
• Activation rate (% completing key action)
• Setup completion rate
• Feature adoption rate
“顿悟”时刻示例:
Slack: Send 2,000 messages in team
Twitter: Follow 30 users
Dropbox: Upload first file
LinkedIn: Connect with 5 people
事件示例:
// Activation milestone
track('activated', {
user_id: 'usr_123',
activation_action: 'first_project_created',
time_to_activation_hours: 2.5
});
3. 留存
用户持续回访的情况
关键问题:
- 第 1 天/第 7 天/第 30 天留存率是多少?
- 哪些群组的留存率最高?
- 是什么导致用户流失?
指标:
• Day 1/7/30 retention rate
• Weekly/Monthly active users (WAU/MAU)
• Churn rate
• Usage frequency
• Feature stickiness (DAU/MAU)
留存率计算:
Day X Retention = Users returning on Day X / Total users in cohort
Example:
Cohort: 1000 users signed up Jan 1
Day 7: 300 returned
Day 7 Retention = 300/1000 = 30%
事件示例:
// Daily engagement
track('session_started', {
user_id: 'usr_123',
session_count: 42,
days_since_signup: 15
});
4. 推荐
用户推荐你的产品的情况
关键问题:
- 病毒系数(K 因子)是多少?
- 哪些用户最常推荐?
- 哪些推荐激励措施有效?
指标:
• Viral coefficient (K-factor)
• Referral rate (% users referring)
• Invites sent per user
• Invite conversion rate
• Net Promoter Score (NPS)
病毒系数:
K = (% users who refer) × (avg invites per user) × (invite conversion rate)
Example:
K = 0.20 × 5 × 0.30 = 0.30
K > 1: Viral growth (each user brings >1 new user)
K < 1: Need paid acquisition
事件示例:
// Referral actions
track('invite_sent', {
user_id: 'usr_123',
channel: 'email',
recipients: 3
});
track('referral_converted', {
referrer_id: 'usr_123',
new_user_id: 'usr_456',
channel: 'email'
});
5. 收入
用户创造商业价值的情况
关键问题:
- 客户生命周期价值(LTV)是多少?
- LTV:CAC 比率是多少?
- 哪些细分群体的变现效果最好?
指标:
• Monthly Recurring Revenue (MRR)
• Average Revenue Per User (ARPU)
• Customer Lifetime Value (LTV)
• LTV:CAC ratio
• Conversion to paid
• Revenue churn
LTV 计算:
LTV = ARPU × Gross Margin / Churn Rate
Example:
ARPU: $50/month
Gross Margin: 80%
Churn: 5%/month
LTV = $50 × 0.80 / 0.05 = $800
Healthy LTV:CAC ratio: 3:1 or higher
事件示例:
// Revenue events
track('subscription_started', {
user_id: 'usr_123',
plan: 'pro',
mrr: 29.99,
billing_cycle: 'monthly'
});
track('upgrade_completed', {
user_id: 'usr_123',
from_plan: 'basic',
to_plan: 'pro',
mrr_change: 20.00
});
AARRR 指标仪表板
## Acquisition
- Total visitors: 50,000
- Sign-ups: 2,500 (5% conversion)
- Top channels: Organic (40%), Paid (30%), Referral (20%)
## Activation
- Activated users: 1,750 (70% of sign-ups)
- Time to activation: 3.2 hours (median)
- Activation funnel drop-off: 30% at setup step 2
## Retention
- Day 1: 60%
- Day 7: 35%
- Day 30: 20%
- Churn: 5%/month
## Referral
- K-factor: 0.4
- Users referring: 15%
- Invites per user: 4.2
- Invite conversion: 25%
## Revenue
- MRR: $125,000
- ARPU: $50
- LTV: $800
- LTV:CAC: 4:1
- Conversion to paid: 25%
扩展参考
从 ## Key Metrics & Formulas 开始的详细内容已移至 reference/extended.md,以保持此技能简洁。任务需要其中迁移的示例、命令目录、检查清单、平台详情或实现模板时,请加载该参考文档。
评论
支持 Markdown