Skip to content

iamAyushSaxena/Product-Analytics-Notion-Growth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

49 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

CI/CD Status Python License Status Contributions

Project Banner

๐Ÿ“Š Product Analytics Deep-Dive: Reverse Engineering Notion's Growth

๐ŸŽฏ Project Overview

A comprehensive product analytics framework that reverse-engineers the growth strategy of Notionโ€”a $10B+ productivity platform. This project demonstrates advanced PM skills in metrics definition, funnel analysis, cohort retention, growth modeling, and data-driven decision-making.

๐Ÿ“ธ Project Preview

Executive Dashboard

Problem Statement

Understanding what drives growth in billion-dollar products is critical for any PM. However, most PMs only see surface-level metrics without understanding:

  • How to define the right North Star metric
  • How to build comprehensive analytics frameworks
  • How to identify and quantify growth levers
  • How to communicate insights to executives

This project simulates the complete analytics infrastructure for a product like Notion, demonstrating how to think systematically about growth, retention, and monetization.


๐ŸŽฏ Key Features

  • North Star Metric Framework: Systematic approach to defining and tracking the most important metric
  • Complete Funnel Analysis: 7-stage user journey with conversion tracking
  • Cohort Retention Analysis: Time-based retention tracking with heatmap visualization
  • Growth Lever Quantification: Data-driven prioritization of 5 major growth opportunities
  • SQL Query Templates: Production-ready queries for analytics databases
  • Executive Dashboards: Beautiful, interactive visualizations for stakeholder communication

๐Ÿ› ๏ธ Tech Stack

  • Python 3.10+: Core programming language
  • Streamlit: Interactive web dashboard & data apps
  • pandas & NumPy: Data manipulation and analysis
  • scipy & statsmodels: Statistical analysis
  • matplotlib & seaborn: Static visualizations
  • plotly: Interactive dashboards and charts
  • Jupyter: Exploratory analysis notebooks

๐Ÿ“ Project Structure

product-analytics-notion-growth/
โ”‚
โ”œโ”€โ”€ dashboard.py                       # ๐Ÿ“Š Streamlit Interactive Dashboard (Main App)
โ”œโ”€โ”€ README.md                          # Project documentation
โ”œโ”€โ”€ LICENSE                            # MIT License
โ”œโ”€โ”€ requirements.txt                   # Python dependencies
โ”œโ”€โ”€ .gitignore                         # Git ignore patterns
โ”‚
โ”œโ”€โ”€ data/                              # All datasets
โ”‚   โ”œโ”€โ”€ raw/                           # Original data
โ”‚   โ”œโ”€โ”€ processed/                     # Analyzed data (Inputs for dashboard)
โ”‚   โ””โ”€โ”€ synthetic/                     # Generated user data
โ”‚
โ”œโ”€โ”€ src/                               # Source code modules
โ”‚   โ”œโ”€โ”€ config.py                      # Configuration & constants
โ”‚   โ”œโ”€โ”€ data_generator.py              # Synthetic data generation logic
โ”‚   โ”œโ”€โ”€ metrics_framework.py           # Core metrics calculations (North Star, WAU)
โ”‚   โ”œโ”€โ”€ funnel_analysis.py             # Funnel & drop-off logic
โ”‚   โ”œโ”€โ”€ cohort_analysis.py             # Cohort retention logic
โ”‚   โ”œโ”€โ”€ growth_modeling.py             # Growth projection & sensitivity models
โ”‚   โ”œโ”€โ”€ sql_queries.py                 # SQL query generation templates
โ”‚   โ””โ”€โ”€ visualization.py               # Static chart generation (Plotly/Matplotlib)
โ”‚
โ”œโ”€โ”€ notebooks/                         # Jupyter notebooks for experimentation
โ”œโ”€โ”€ sql/                               # Generated production-ready SQL files
โ”‚
โ”œโ”€โ”€ outputs/                           # Generated analysis outputs
โ”‚   โ”œโ”€โ”€ figures/                       # Static charts (PNG/HTML)
โ”‚   โ”œโ”€โ”€ dashboards/                    # Legacy HTML dashboards
โ”‚   โ””โ”€โ”€ reports/                       # Final text analysis reports
โ”‚
โ”œโ”€โ”€ docs/                              # Documentation
โ””โ”€โ”€ scripts/                           # Execution scripts
    โ””โ”€โ”€ run_full_analysis.py           # Main analysis pipeline (Run this first)

๐Ÿš€ Installation & Setup

Prerequisites

  • Python 3.10 or higher
  • pip (Python package manager)

Step 1: Download/Extract the Project

# Extract ZIP file to desired location
# Navigate to project directory
cd product-analytics-notion-growth

Step 2: Create Virtual Environment (Windows)

# Create virtual environment
python -m venv venv

# Activate virtual environment
venv\Scripts\activate.bat

Step 3: Install Dependencies

pip install -r requirements.txt

Step 4: Verify Installation

python -c "import pandas; import plotly; print('โœ… All dependencies installed!')"

๐Ÿ’ป Usage

1. Run Analysis Pipeline (Generate Data) First, generate the synthetic data and perform the analysis:

python scripts/run_full_analysis.py

2. Launch Interactive Dashboard Visualize the results in the Streamlit app:

streamlit run dashboard.py

This executes the entire workflow (~3-5 minutes):

  1. โœ… Generate 50,000 synthetic user profiles and events
  2. โœ… Calculate North Star metric and supporting KPIs
  3. โœ… Analyze 7-stage user funnel
  4. โœ… Perform cohort retention analysis
  5. โœ… Model 5 growth levers with revenue projections
  6. โœ… Generate SQL query templates
  7. โœ… Create interactive visualizations and dashboards
  8. โœ… Produce executive summary report

Run Individual Modules

# Data generation only
python src\data_generator.py

# Metrics framework only
python src\metrics_framework.py

# Funnel analysis only
python src\funnel_analysis.py

# Cohort analysis only
python src\cohort_analysis.py

# Growth modeling only
python src\growth_modeling.py

# SQL queries only
python src\sql_queries.py

Using Jupyter Notebooks

jupyter notebook
# Navigate to (notebooks/) for interactive exploration

๐Ÿ“Š Key Outputs

1. North Star Metric Dashboard

  • File: outputs/dashboards/executive_dashboard.html
  • Shows: Weekly Active Collaborative Workspaces (North Star)
  • Insight: Tracks engagement + network effects

2. User Funnel Analysis

  • File: outputs/figures/user_funnel.html
  • Shows: 7-stage conversion funnel with drop-off rates
  • Insight: Identifies biggest bottlenecks

3. Visualizations

  • File: outputs/figures/ (Static Charts)
  • Interactive Dashboard: Streamlit Web App (dashboard.py)

4. Cohort Retention Heatmap

  • File: outputs/figures/cohort_retention_heatmap.html
  • Shows: Month-over-month retention by signup cohort
  • Insight: Reveals product improvements over time

5. Growth Levers Prioritization

  • File: outputs/figures/growth_levers.html
  • Shows: 5 growth opportunities ranked by revenue impact
  • Insight: Data-driven roadmap prioritization

6. SQL Query Templates

  • Location: sql/
  • Includes: Production-ready queries for PostgreSQL
  • Use Case: Implement in real analytics database

7. Final Report

  • File: outputs/reports/analytics_framework_report.txt
  • Contains: Executive summary with recommendations

๐Ÿ“ˆ Sample Results

North Star Metric

  • Metric: Weekly Active Collaborative Workspaces
  • Current: ~2.1M (simulated)
  • Target: 5M
  • Gap: 2.9M (58% to target)

User Funnel Performance

Stage Users Conversion Drop-off
Signup 50,000 100% 0%
Activation 30,000 60% 40%
Engagement 13,500 45% 55%
Habit Formation 4,725 35% 65%
Collaboration 2,363 50% 50%
Monetization 591 25% 75%

Overall Conversion: 1.18% (Signup โ†’ Paid)

Top 3 Growth Opportunities

Rank Lever Impact Confidence
1 SEO Content Strategy $12.5M annual revenue High
2 Viral Sharing Optimization $7.8M annual revenue Medium
3 Template Discovery $6.2M annual revenue High

Cohort Insights

  • Month 1 Retention: 45.2%
  • Month 3 Retention: 28.7%
  • Month 6 Retention: 18.9%
  • Improvement: Late cohorts show 8% better retention vs early cohorts

๐Ÿงช Key Insights Demonstrated

1. Metrics Framework

  • Defined North Star metric combining engagement + collaboration
  • Built supporting KPI tree (DAU, WAU, MAU, Stickiness)
  • Calculated activation, engagement, and monetization rates

2. Funnel Analysis

  • Identified activation โ†’ engagement as biggest drop-off (55%)
  • Segment analysis shows enterprise users convert 6x better
  • Referral channel drives 2x higher quality users

3. Cohort Retention

  • Users who activate in <24 hours have 2x better retention
  • Collaborative users have 3x higher LTV
  • Product improvements visible in cohort retention curves

4. Growth Modeling

  • SEO content strategy could add $12.5M annual revenue
  • Compound effect of top 3 levers: $26.5M over 12 months
  • Sensitivity analysis shows robust projections

5. SQL Proficiency

  • Production-ready queries for all key metrics
  • Optimized for PostgreSQL with proper indexing
  • Reusable templates for real implementations

๐ŸŽ“ Skills Demonstrated

Product Management

  • โœ… North Star metric definition
  • โœ… Analytics framework design
  • โœ… Growth strategy development
  • โœ… Data-driven prioritization
  • โœ… Executive communication

Data Analysis

  • โœ… Funnel analysis
  • โœ… Cohort retention analysis
  • โœ… Statistical modeling
  • โœ… Segmentation analysis
  • โœ… Predictive modeling

Technical Skills

  • โœ… Python (pandas, numpy, scipy)
  • โœ… SQL query writing
  • โœ… Data visualization (plotly, matplotlib)
  • โœ… Statistical analysis
  • โœ… Dashboard creation

Business Acumen

  • โœ… Revenue modeling
  • โœ… LTV calculations
  • โœ… Growth lever quantification
  • โœ… ROI analysis
  • โœ… Strategic recommendations

๐Ÿ“š Documentation


๐ŸŽฏ Use Cases

This project framework can be adapted for:

  • SaaS Products: Subscription-based software analytics
  • Consumer Apps: Mobile app growth analysis
  • Marketplace Platforms: Two-sided marketplace metrics
  • Social Networks: Engagement and virality tracking
  • E-commerce: Purchase funnel optimization

๐Ÿค Contributing

This is a portfolio project, but feedback is welcome!

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


๐Ÿ‘ค Author

Ayush Saxena


๐Ÿ™ Acknowledgments

  • Notion: Inspiration for the analytics framework
  • Amplitude: Product analytics best practices
  • Mixpanel: Cohort analysis methodologies
  • Lenny's Newsletter: Growth insights and frameworks

๐Ÿ“ž Support

For questions or issues:

  1. Check the documentation
  2. Review the lab logbook
  3. Open an issue on GitHub
  4. Reach out via [LinkedIn/Email]

โญ If this project helped you, please star the repository!

๐Ÿ’ผ Looking for a PM who can do this for your product? Let's connect!

About

Comprehensive analytics framework demonstrating PM skills in metrics definition, funnel analysis, cohort retention, and growth modeling. Includes North Star metric framework, SQL queries, and interactive dashboards.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

โšก