6 min read

How to Set Up Funnel Analysis in PostHog

Funnels show you where users drop off in your product flow. PostHog makes it easy to track a multi-step journey—from signup through payment—and see exactly which step loses the most people. This guide walks you through instrumenting events and building your first funnel.

Track Events That Matter

Before you build a funnel, you need to emit the events that represent each step.

Initialize PostHog and Capture Events

Add the PostHog SDK to your app and start sending events. Each funnel step needs its own event. Use posthog.capture() to send an event with the event name and any properties you want to record.

javascript
import posthog from 'posthog-js';

// Initialize PostHog (usually in your app entry point)
posthog.init('your-api-key', {
  api_host: 'https://app.posthog.com',
});

// Track a user viewing the pricing page
posthog.capture('pricing_viewed', {
  plan: 'pro',
  source: 'navbar',
});

// Track a signup event
posthog.capture('user_signup', {
  email: user.email,
  signup_method: 'google',
});

// Track a payment attempt
posthog.capture('payment_attempted', {
  amount: 99,
  currency: 'USD',
});
Capture events at each step of your user journey.

Use Consistent Event Names

Event names should be descriptive and consistent. Avoid adding timestamps or user IDs to the event name—use properties instead. PostHog automatically tracks $user_id, but you can also set custom user properties with posthog.people.set().

javascript
// Good: clear, reusable event names
posthog.capture('checkout_started');
posthog.capture('checkout_completed');

// Bad: event names with timestamps or user IDs
posthog.capture('checkout_12345');
posthog.capture('user_123_checkout');

// Set custom user properties for segmentation
posthog.people.set({
  plan: 'enterprise',
  industry: 'saas',
  mrr: 5000,
});
Keep event names simple and let PostHog handle identification.
Watch out: If you don't send events consistently (e.g., some users skip events), your funnel will show unexpected drop-offs.

Build Your Funnel in PostHog

Once events are flowing, create a funnel to visualize the conversion path.

Navigate to Funnels

In your PostHog dashboard, go to Insights in the left sidebar, then click Funnels. This opens the funnel builder where you'll define your steps.

Add Steps to Your Funnel

Click + Add step and select the events that represent each stage. The order matters—PostHog calculates the conversion rate from step to step. For a typical signup flow, you might use pricing_viewedsignup_starteduser_signuppayment_attemptedpayment_completed.

javascript
// Your event sequence (defined in PostHog UI, not code)
// Step 1: posthog.capture('pricing_viewed')
// Step 2: posthog.capture('signup_started')
// Step 3: posthog.capture('user_signup')
// Step 4: posthog.capture('payment_attempted')
// Step 5: posthog.capture('payment_completed')

// PostHog calculates:
// Step 1 → 2: % of users who view pricing and start signup
// Step 2 → 3: % of users who complete signup
// Step 3 → 4: % of users who attempt payment
// Step 4 → 5: % of users who complete payment
PostHog chains events in order and shows drop-offs at each step.

Apply Filters and Breakdowns (Optional)

Filter your funnel by user properties or event properties. For example, filter to only users from the US, or break down your funnel by plan type to see if enterprise users convert differently. Click Filter in the funnel builder and choose your criteria.

javascript
// Example: capture events with properties for filtering
posthog.capture('user_signup', {
  country: 'US',
  plan: 'pro',
  source: 'ad',
});

// In PostHog UI, filter by:
// - country = 'US'
// - plan = 'pro'
// - source = 'ad'
// This shows conversion for a specific segment.
Use properties to segment your funnel by user type or campaign.
Tip: If your funnel is too long (5+ steps), users may not complete it in one session. Break it into smaller, related funnels instead.

Analyze and Act on Results

Once your funnel is live, you can dig into the data to find optimization opportunities.

Identify Drop-Off Points

PostHog shows you the percentage of users completing each step and the absolute count. Look for the steepest drop-offs—these are your biggest optimization targets. Hover over a step to see detailed stats, including the time users spent before converting.

Compare Funnels Across Segments

Use the Breakdown by feature to split your funnel by user properties. For example, break down by device type to see if mobile users drop off more during checkout, or by signup source to see which campaigns have the highest-quality users.

javascript
// Ensure you're tracking the properties you want to segment by
posthog.capture('checkout_started', {
  device_type: 'mobile', // or 'desktop'
  signup_source: 'google_ads', // or 'organic', 'direct'
  plan: 'starter', // or 'pro', 'enterprise'
});

// In PostHog UI, use Breakdown by:
// - device_type: see if mobile checkout is broken
// - signup_source: see which channels bring quality users
// - plan: see if enterprise users have different conversion rates
Track properties at every event so you can slice your funnel later.

Export Funnel Data

Click the Export button to download funnel results as CSV. You can use this data in spreadsheets or feed it into your internal dashboards. The export includes step counts, conversion rates, and timing data.

Watch out: Don't confuse cumulative drop-off with step-to-step drop-off. PostHog shows both; the step-to-step rate is usually what you care about.

Common Pitfalls

  • Forgetting to track a step mid-funnel. If Step 2 → 3 looks empty, users either didn't hit Step 2 or didn't trigger Step 3 afterward. Check your event names and properties.
  • Using too many steps in one funnel. If a user takes 3 days to move through 6 steps, PostHog won't connect them. Use shorter, single-session funnels.
  • Not setting user properties early. If you want to segment by plan or region, capture those properties in your signup event, not days later.
  • Treating low conversion rates as a bug. Funnels often show harsh numbers—50% drop-off is common. Use breakdowns to find which segment is underperforming, not the funnel itself.

Wrapping Up

You now have a working funnel in PostHog showing where users drop off in your product. Start with a simple flow, like signup → payment, then add more funnels for different user journeys. As you discover patterns, use the breakdown feature to dig into which segments convert best. If you want to track this automatically across tools, Product Analyst can help.

Track these metrics automatically

Product Analyst connects to your stack and surfaces the insights that matter.

Try Product Analyst — Free