An enterprise-grade funnel analytics platform built with Streamlit, featuring real-time calculations, multiple data sources, and advanced funnel analysis capabilities.
- Real Funnel Calculation: Process actual event data with user IDs, event names, and timestamps
- Multiple Counting Methods:
unique_users
: Count unique users progressing through each stepevent_totals
: Count total events at each stepunique_pairs
: Step-to-step conversion analysis
- Flexible Conversion Windows: Configure time windows (hours/days/weeks) for funnel completion
- Re-entry Mode Logic: Handle users who restart the funnel process
- File Upload: Support for CSV and Parquet files
- ClickHouse Integration: Enterprise OLAP database connectivity
- Sample Data: Built-in demonstration datasets
- Professional Funnel Charts: Interactive Plotly visualizations
- Sankey Flow Diagrams: User journey flow analysis
- Real-time Metrics: Dynamic conversion rate calculations
Your event data must contain these columns:
user_id
: Unique identifier for each userevent_name
: Name of the event/action performedtimestamp
: When the event occurred (ISO format recommended)
event_properties
: JSON string with additional event metadata for segmentation
user_id,event_name,timestamp,event_properties
user_00001,User Sign-Up,2024-01-01 10:00:00,"{""platform"": ""mobile""}"
user_00001,Verify Email,2024-01-01 10:15:00,"{""platform"": ""mobile""}"
user_00001,First Login,2024-01-01 11:30:00,"{""platform"": ""mobile""}"
- Install dependencies:
pip install -r requirements.txt
- Run the application:
streamlit run app.py
Choose your data source from the sidebar:
- Sample Data: Use built-in demonstration data
- Upload File: Upload CSV or Parquet files
- ClickHouse: Connect to your enterprise database
For enterprise deployments, configure ClickHouse connection:
-- Sample query structure
SELECT
user_id,
event_name,
timestamp,
event_properties
FROM events
WHERE timestamp >= '2024-01-01'
ORDER BY user_id, timestamp
Configure analysis parameters:
- Conversion Window: Time limit for users to complete the funnel
- Counting Method: How to count conversions
- Re-entry Mode: How to handle funnel restarts
- Select events from your data
- Add them to the funnel in sequence
- Run the analysis
- View results in multiple visualization formats
DataSourceManager
: Handles multiple data sources and validationFunnelCalculator
: Core calculation engine with multiple algorithmsFunnelVisualizer
: Professional visualization componentsFunnelConfig
&FunnelResults
: Type-safe data structures
Tracks unique users progressing through each funnel step within the conversion window.
Counts total events at each step, useful for understanding event volume.
Analyzes step-to-step conversions, ideal for identifying specific drop-off points.
Users are only counted on their first attempt through the funnel.
Users can be counted multiple times if they restart the funnel process.
The platform calculates and displays:
- Overall Conversion Rate: End-to-end funnel completion
- Step-by-Step Conversion: Individual step performance
- Drop-off Analysis: Where users leave the funnel
- User Journey Flow: Visual representation of user paths
- Scalable Data Processing: Handles large datasets efficiently
- Database Integration: Direct connection to ClickHouse and other OLAP databases
- Real-time Calculations: Dynamic funnel metrics without pre-aggregation
- Professional Visualizations: Export-ready charts and diagrams
- Flexible Configuration: Customizable analysis parameters
- Optimized Algorithms: Efficient funnel calculation for large datasets
- Caching: Built-in Streamlit caching for improved performance
- Modular Architecture: Easy to extend and maintain
This platform is designed for enterprise use cases. For customization:
- Extend
DataSourceManager
for new data sources - Add calculation methods to
FunnelCalculator
- Create new visualizations in
FunnelVisualizer
- Define custom configuration options in
FunnelConfig
For developers working on the platform:
- Testing Documentation: See
tests/README.md
for comprehensive testing architecture - Test Data: See
test_data/README.md
for test data organization - Run Tests: Use
python run_tests.py
for professional test execution
Enterprise-grade funnel analytics platform for professional use.