# Funnel Insights

Track user progression through sequential events to measure conversion rates and identify drop-offs.

**Best for:**

- Signup and onboarding flows
- Checkout and purchase processes
- Feature adoption journeys
- Multi-step workflows

**Example use cases:**

- "What percentage of users complete our signup flow?"
- "Where do users drop off in the checkout process?"
- "How long does it take users to activate our key feature?"

## Creating Funnels

A funnel requires at least 2 events that represent sequential steps in a user journey:

![Funnel insight showing step-by-step conversion in the chart preview](/screenshots/charts-funnelchart--single-series.png)

*Funnel insight showing step-by-step conversion in the chart preview*

```typescript
// Example: Type-safe funnel tracking with React SDK
import {
  type FunnelMapping,
  useAltertable,
} from '@altertable/altertable-react';

interface CheckoutFunnelMapping extends FunnelMapping {
  checkout: [
    { name: 'Product Viewed'; properties: { product_id: string } },
    { name: 'Added to Cart'; properties: { quantity: number } },
    { name: 'Checkout Started'; properties: { cart_value: number } },
    {
      name: 'Purchase Completed';
      properties: { order_id: string; amount: number };
    },
  ];
}

function CheckoutFlow() {
  const { selectFunnel } = useAltertable<CheckoutFunnelMapping>();
  const { trackStep } = selectFunnel('checkout');

  const handleProductView = (productId: string) => {
    trackStep('Product Viewed', { product_id: productId });
  };

  const handleAddToCart = (quantity: number) => {
    trackStep('Added to Cart', { quantity });
  };

  const handleCheckout = (cartValue: number) => {
    trackStep('Checkout Started', { cart_value: cartValue });
  };

  const handlePurchase = (orderId: string, amount: number) => {
    trackStep('Purchase Completed', { order_id: orderId, amount });
  };
}
```

## Common Funnel Examples

**Signup Funnel**

1. Landing Page Viewed
2. Signup Started
3. Email Verified
4. Profile Completed

**Purchase Funnel**

1. Product Viewed
2. Added to Cart
3. Checkout Started
4. Purchase Completed

**Feature Adoption Funnel**

1. Feature Discovered
2. Feature Clicked
3. Feature Configured
4. Feature Used Successfully

## Funnel Parameters

- **Date range**: Period to analyze, such as the last 30 days
- **Event filters**: Filter events by properties, such as `button_name = "Sign Up"`
- **User filters**: Filter by user traits, such as `plan = "pro"`

## Key Funnel Metrics

- **Step count**: Number of users who completed each step
- **Conversion rate**: Percentage who progressed to the next step
- **Overall conversion**: Percentage who completed entire funnel
- **Drop-off rate**: Percentage who did not continue
- **Step timing**: Average, minimum, and maximum time between completed steps

## Querying Funnel Data

Funnel data is stored in your [lakehouse](/docs/lakehouse.md) and can be queried directly using [SQL insights](/docs/query-data/visualizations/insights.md). You can analyze conversion rates over time, identify drop-off points, and calculate time-to-convert metrics by querying the events table with appropriate filters and aggregations.

Learn more about [tracking events](/docs/ingest-data/product-analytics/track.md) to capture the data you need for funnel analysis.