Funnel analysis skill
Quick answer
- 01What is it?
- Analyze user conversion funnels, calculate step-by-step conversion rates, create interactive visualizations, and identify optimization opportunities. The value is a focused slice of funnel analysis skill judgment, useful when several similar skills cover the same ground.
- 02Inputs
- Context the agent needs: your goals, audience, constraints, and any source material the skill asks for.
- 03Output
- A ready-to-use result: the analysis, copy, or recommendations the agent produces.
Add this skill
Install as a package
Installs this one skill package for your coding agent, including any supporting files that skill ships with — not every skill in the repository. Read the tutorial.
$ npx skills add liangdabiao/claude-data-analysis-ultra-main --skill funnel-analysisSkill instructions
The instruction file for this skill. The skill also includes other files you need to install to use it.
Funnel Analysis Skill
Analyze user behavior through multi-step conversion funnels to identify bottlenecks and optimization opportunities in marketing campaigns, user journeys, and business processes.
Quick Start
This skill helps you:
- Build conversion funnels from multi-step user data
- Calculate conversion rates between each step
- Perform segmentation analysis by different user attributes
- Create interactive visualizations with Plotly
- Generate business insights and optimization recommendations
When to Use
- Marketing campaign analysis (promotion → purchase)
- User onboarding flow analysis
- Website conversion funnel optimization
- App user journey analysis
- Sales pipeline analysis
- Lead nurturing process analysis
Key Requirements
Install required packages:
pip install pandas plotly matplotlib numpy seaborn
Core Workflow
1. Data Preparation
Your data should include:
- User journey steps (clicks, page views, actions)
- User identifiers (customer_id, user_id, etc.)
- Timestamps or step indicators
- Optional: user attributes for segmentation (gender, device, location)
2. Analysis Process
- Load and merge user journey data
- Define funnel steps and calculate metrics
- Perform segmentations (by device, gender, etc.)
- Create visualizations
- Generate insights and recommendations
3. Output Deliverables
- Funnel visualization charts
- Conversion rate tables
- Segmented analysis reports
- Optimization recommendations
Example Usage Scenarios
E-commerce Purchase Funnel
# Steps: Promotion → Search → Product View → Add to Cart → Purchase
# Analyze by device type and customer segment
User Registration Funnel
# Steps: Landing Page → Sign Up → Email Verification → Profile Complete
# Identify where users drop off most
Content Consumption Funnel
# Steps: Article View → Comment → Share → Subscribe
# Measure engagement conversion rates
Common Analysis Patterns
- Bottleneck Identification: Find steps with highest drop-off rates
- Segment Comparison: Compare conversion across user groups
- Temporal Analysis: Track conversion over time
- A/B Testing: Compare different funnel variations
- Optimization Impact: Measure changes before/after improvements
Integration Examples
See examples/ directory for:
basic_funnel.py- Simple funnel analysissegmented_funnel.py- Advanced segmentation analysis- Sample datasets for testing
Best Practices
- Ensure data quality and consistency
- Define clear funnel steps
- Consider user journey time windows
- Validate statistical significance
- Focus on actionable insights
Supporting file: examples/sample_data/README.md
Sample Data for Funnel Analysis
This directory contains sample datasets to help you understand how to structure your data for funnel analysis.
Data Structure Requirements
For effective funnel analysis, your data should include:
Required Columns
- User Identifier: Unique ID for each user (e.g.,
user_id,customer_id) - Step Indicators: Boolean flags or timestamps for each funnel step
Optional Columns (for segmentation)
- Device Type:
device,platform,client_type - User Segment:
segment,user_type,customer_tier - Demographics:
gender,age_group,location - Temporal Data:
date,timestamp,cohort
Example Data Formats
E-commerce Funnel
user_id,device,segment,homepage,search,product_view,add_to_cart,purchase
1001,Mobile,New User,True,True,False,False,False
1002,Desktop,Returning User,True,True,True,True,True
1003,Mobile,VIP User,True,True,True,True,False
Marketing Funnel
user_id,traffic_source,campaign,ad_click,landing_page,sign_up,email_verify
1001,Google,campaign_a,True,True,True,False
1002,Facebook,campaign_b,True,False,False,False
1003,Direct,organic,True,True,True,True
User Onboarding Funnel
user_id,sign_up_date,profile_complete,tutorial_start,tutorial_complete,first_action
1001,2024-01-15,True,True,True,True
1002,2024-01-16,True,False,False,False
1003,2024-01-17,True,True,True,False
Key Considerations
- Data Consistency: Ensure consistent user identification across all steps
- Step Order: Maintain logical order in your funnel steps
- Missing Values: Handle missing data appropriately (usually means user didn't reach that step)
- Time Windows: Consider appropriate time frames for user journeys
- Sample Size: Ensure adequate sample sizes for reliable analysis
Data Validation Checklist
- Unique user identifiers for all records
- Clear step definitions and indicators
- Consistent data types across columns
- Appropriate handling of missing values
- Sufficient sample size for each segment
- Logical flow between funnel steps
Supporting file: guide/funnel_guide.md
漏斗分析 - 详细操作指南
目录
- 漏斗定义 (#1-%E6%BC%8F%E6%96%97%E5%AE%9A%E4%B9%89)
- 数据准备 (#2-%E6%95%B0%E6%8D%AE%E5%87%86%E5%A4%87)
- 漏斗构建 (#3-%E6%BC%8F%E6%96%97%E6%9E%84%E5%BB%BA)
- 流失分析 (#4-%E6%B5%81%E5%A4%B1%E5%88%86%E6%9E%90)
- 分群分析 (#5-%E5%88%86%E7%BE%A4%E5%88%86%E6%9E%90)
- 优化建议 (#6-%E4%BC%98%E5%8C%96%E5%BB%BA%E8%AE%AE)
1. 漏斗定义
1.1 常见漏斗类型
电商转化漏斗
访问 → 搜索/浏览 → 商品详情 → 加入购物车 → 结算 → 支付成功
用户注册漏斗
落地页 → 点击注册 → 填写信息 → 邮箱验证 → 完成注册
内容消费漏斗
内容曝光 → 点击 → 阅读 >30% → 评论 → 分享 → 关注
1.2 漏斗设计原则
- 步骤清晰: 每个步骤有明确的定义
- 顺序正确: 按用户实际旅程顺序
- 可衡量: 每个步骤都有数据可追踪
- 不重叠: 步骤之间互斥
2. 数据准备
2.1 数据格式要求
格式1: 用户事件日志
| user_id | event | timestamp | metadata |
|---|---|---|---|
| U123 | visit | 2025-01-19 10:00 | ... |
| U123 | view_item | 2025-01-19 10:05 | ... |
| U123 | purchase | 2025-01-19 10:10 | ... |
格式2: 用户漏斗标记
| user_id | step1 | step2 | step3 | ... |
|---|---|---|---|---|
| U123 | 1 | 1 | 0 | ... |
2.2 数据清洗
- 去重
- 过滤机器人/测试数据
- 时间窗口设置(如30天内)
- 归因逻辑(首次/末次)
3. 漏斗构建
3.1 计算步骤
# 伪代码
1. 获取第一步用户数
2. 对于每个后续步骤:
a. 计算通过上一步且完成当前步骤的用户数
b. 计算转化率 = 当前步骤 / 上一步骤
c. 计算留存率 = 当前步骤 / 第一步
3.2 关键指标
- 转化率: 当前步骤 / 上一步骤
- 留存率: 当前步骤 / 第一步
- 流失率: 1 - 转化率
- 整体转化率: 最后一步 / 第一步
4. 流失分析
4.1 识别关键流失点
- 计算每步的流失率
- 找出流失率最高的步骤
- 分析流失的时间模式
4.2 流失原因分析
- 用户分群对比
- A/B测试验证
- 用户调研补充
- 竞品对比
5. 分群分析
5.1 分群维度
- 用户属性: 新/老用户、性别、年龄、地区
- 行为特征: 用户价值、活跃度、忠诚度
- 设备: 移动端/桌面端、设备类型
- 渠道来源: 搜索、社交媒体、直接访问
5.2 分群对比方法
- 计算各分群的漏斗
- 对比整体转化率
- 对比关键流失点
- 识别高/低转化分群
6. 优化建议
6.1 优化优先级
- 高流失 + 高流量 → 优先优化
- 高流失 + 低流量 → 次优先
- 低流失 + 高流量 → 维持
- 低流失 + 低流量 → 最后
6.2 常见优化方向
- UI/UX改进: 简化流程、减少步骤
- 文案优化: 更清晰的说明
- 性能优化: 加快加载速度
- 激励措施: 优惠券、折扣等
- 社交证明: 用户评价、销量显示
6.3 A/B测试验证
将优化建议通过A/B测试验证效果。
附录:常见漏斗示例
A. 电商漏斗
访问 → 搜索/浏览 → 商品详情 → 加入购物车 → 结算 → 支付
B. SaaS漏斗
访问 → 注册 → 激活 → 付费 → 留存 → 推荐
C. 内容漏斗
曝光 → 点击 → 阅读 → 评论 → 分享 → 关注
相关资源:
examples/basic_funnel.py- 基础漏斗分析examples/sample_data/- 示例数据
Supporting file: README.md
Funnel Analysis Skill
This skill provides comprehensive funnel analysis capabilities for understanding user conversion patterns and optimizing business processes.
Overview
The Funnel Analysis Skill is designed to analyze multi-step user journeys, calculate conversion rates, and identify optimization opportunities in various business contexts including e-commerce, marketing campaigns, user onboarding, and content consumption.
Features
Core Capabilities
- Multi-step Funnel Construction: Build funnels from user journey data
- Conversion Rate Analysis: Calculate step-by-step and overall conversion rates
- Segmentation Analysis: Compare funnels across different user segments
- Interactive Visualizations: Create engaging funnel charts with Plotly
- Automated Insights: Generate actionable recommendations
Analysis Types
- Standard Funnel Analysis: Track conversion through defined steps
- Segmented Analysis: Compare different user groups
- Temporal Analysis: Track changes over time
- Cohort Analysis: Analyze behavior by user cohorts
- A/B Test Analysis: Compare funnel variations
File Structure
funnel-analysis/
├── SKILL.md # Main skill definition
├── README.md # This file
├── examples/ # Usage examples
│ ├── basic_funnel.py # Simple funnel analysis
│ ├── segmented_funnel.py # Segmented analysis
│ └── sample_data/ # Example datasets
└── scripts/ # Utility scripts
├── funnel_analyzer.py # Core analysis functions
└── visualizer.py # Visualization utilities
Getting Started
Prerequisites
Ensure you have these Python packages installed:
pip install pandas plotly matplotlib numpy seaborn
Basic Usage
- Prepare your data with user journey steps
- Define your funnel steps and metrics
- Run analysis using the provided scripts
- Visualize results with interactive charts
- Generate insights for optimization
Data Format Requirements
Your data should include:
- User ID: Unique identifier for each user
- Step indicators: Boolean flags or timestamps for each step
- Segmentation attributes (optional): Device, gender, location, etc.
- Timestamps (optional): For temporal analysis
Examples
E-commerce Example
# Analyze: Homepage → Search → Product View → Add to Cart → Purchase
from scripts.funnel_analyzer import FunnelAnalyzer
analyzer = FunnelAnalyzer()
results = analyzer.analyze_funnel(data, steps)
analyzer.visualize(results)
Marketing Campaign Example
# Track: Ad Click → Landing Page → Sign Up → First Purchase
# Compare by traffic source and device type
Best Practices
-
Data Quality
- Ensure consistent user identification
- Handle missing data appropriately
- Validate step sequences
-
Analysis Design
- Define clear, logical funnel steps
- Consider time windows for user journeys
- Account for multiple touchpoints
-
Interpretation
- Look for statistically significant patterns
- Consider business context
- Focus on actionable insights
Common Use Cases
- E-commerce: Purchase funnel optimization
- SaaS: User onboarding and activation
- Content Platforms: Engagement and conversion
- Lead Generation: Marketing campaign effectiveness
- Mobile Apps: User retention and feature adoption
Troubleshooting
Common Issues
-
Low Conversion Rates
- Check data quality and step definitions
- Verify user journey completeness
- Consider time window adjustments
-
Segment Size Disparities
- Ensure sufficient sample sizes
- Consider combining small segments
- Use statistical significance tests
-
Complex User Journeys
- Simplify funnel structure
- Consider multiple funnel paths
- Use path analysis techniques
Advanced Topics
Statistical Considerations
- Confidence intervals for conversion rates
- A/B test significance testing
- Cohort retention analysis
Extensions
- Machine learning for funnel prediction
- Real-time funnel monitoring
- Multi-channel attribution modeling
Support
For issues or questions, refer to the examples directory or modify the scripts to suit your specific needs.
Supporting file: templates/funnel_report_template.md
漏斗分析报告
项目名称: [项目名称] 分析周期: [开始日期] - [结束日期] 分析人员: [姓名] 报告日期: [YYYY-MM-DD]
1. 执行摘要
1.1 整体转化
- 总用户数: [N]
- 最终转化数: [N]
- 整体转化率: [X%]
1.2 关键流失点
- 最大流失: [步骤1] → [步骤2], 流失率 [X%]
- 次要流失: [步骤2] → [步骤3], 流失率 [Y%]
1.3 优化建议
- [建议1]
- [建议2]
2. 漏斗定义
2.1 漏斗步骤
| 步骤 | 名称 | 定义 |
|---|---|---|
| 1 | [步骤1] | [定义] |
| 2 | [步骤2] | [定义] |
| 3 | [步骤3] | [定义] |
| ... | ... | ... |
3. 整体漏斗分析
3.1 漏斗数据
| 步骤 | 用户数 | 转化率 | 留存率 |
|---|---|---|---|
| 1 | [N] | - | 100% |
| 2 | [N] | [X%] | [Y%] |
| 3 | [N] | [X%] | [Y%] |
| ... | ... | ... | ... |
3.2 流失分析
| 步骤对 | 流失数 | 流失率 |
|---|---|---|
| 1→2 | [N] | [X%] |
| 2→3 | [N] | [X%] |
| ... | ... | ... |
4. 分群漏斗分析
4.1 按设备分群
| 设备 | 整体转化率 | 关键流失点 |
|---|---|---|
| 移动端 | [X%] | [步骤] |
| 桌面端 | [X%] | [步骤] |
4.2 按用户类型分群
| 用户类型 | 整体转化率 | 关键流失点 |
|---|---|---|
| 新用户 | [X%] | [步骤] |
| 老用户 | [X%] | [步骤] |
4.3 按来源分群
| 来源 | 整体转化率 | 关键流失点 |
|---|---|---|
| [来源1] | [X%] | [步骤] |
| [来源2] | [X%] | [步骤] |
5. 时间趋势分析
5.1 转化率趋势
[描述转化率随时间的变化]
5.2 流失点趋势
[描述各流失点随时间的变化]
6. 可视化结果
6.1 漏斗图
[插入漏斗图]
6.2 分群漏斗对比
[插入对比图表]
6.3 趋势图
[插入趋势图]
7. 深度分析
7.1 流失用户特征
[描述流失用户的共同特征]
7.2 转化用户特征
[描述转化用户的共同特征]
7.3 用户旅程分析
[描述典型的用户旅程模式]
8. 结论与建议
8.1 主要结论
- [结论1]
- [结论2]
- [结论3]
8.2 优化建议
- 高优先级: [建议1]
- 中优先级: [建议2]
- 低优先级: [建议3]
8.3 A/B测试建议
[建议的A/B测试方向]
附录: 详细数据和分析代码
Common questions
How do I install Funnel analysis skill in Cursor, Claude Code, or Codex?
Run npx skills add liangdabiao/claude-data-analysis-ultra-main --skill funnel-analysis in the project where you want it, then ask your agent for the skill by name. The --skill flag installs only Funnel analysis skill, not every skill in the repository.
Where does Funnel analysis skill come from and what license is it under?
Funnel analysis skill comes from the liangdabiao/claude-data-analysis-ultra-main repository on GitHub. That repository has 274 GitHub stars. No license was detected on the source repository, so check with the author before redistributing it.
Prefer plain text? Read the Funnel analysis skill guide as markdown.