A funnel shows you where users abandon your product. Instead of guessing why people don't complete signup, onboarding, or first actions, you see the actual drop-off at each step. In PostHog, funnels measure conversion rates across a sequence of events—critical for fixing leaky flows.
Tracking Events That Form Your Funnel
Funnels are made of events. Before you can analyze a funnel, you need to track the steps users take.
Install and Initialize PostHog
The PostHog JavaScript SDK captures events automatically and lets you send custom events. Install it via npm and initialize with your project key.
import posthog from 'posthog-js';
posthog.init('phc_YOUR_PROJECT_KEY', {
api_host: 'https://us.posthog.com',
loaded: (ph) => {
window.posthog = ph;
}
});Capture Events at Each Funnel Step
Fire an event when a user reaches each step. For a signup → onboarding → first action funnel, capture those three events explicitly with relevant properties.
// User signs up
posthog.capture('user_signed_up', {
plan: 'free',
source: 'google'
});
// User completes onboarding
posthog.capture('onboarding_completed', {
duration_seconds: 120
});
// User takes their first action
posthog.capture('first_action_taken', {
action_type: 'created_dashboard'
});Identify Users for Segmentation
Use identify() to attach user properties like plan, signup source, or account age. These let you segment your funnel later and spot which user types convert best.
posthog.identify(
'user_id_123',
{
email: '[email protected]',
signup_source: 'organic_search',
account_age_days: 5,
plan: 'free'
}
);
posthog.capture('user_signed_up');user_signed_up, not userSignedUp).Creating and Reading Funnels in PostHog
Once events flow in, you create a funnel to see conversion rates and identify drop-off.
Navigate to Funnels
In PostHog, go to Product Analytics > Funnels. Click New Funnel to open the builder.
Add Steps in Sequence
Add funnel steps in chronological order. Select events from the dropdown (e.g., user_signed_up, then onboarding_completed, then first_action_taken). PostHog calculates what percentage of users move through each step.
Read Conversion Rates and Drop-off
The funnel shows conversion percentages at each step. If 1000 users sign up but only 200 complete onboarding, that's an 80% drop-off. Use date filters to spot trends—declining conversion week-over-week means something broke.
// PostHog API funnel query structure
// Funnels respect a time window—how long users have to move through steps
// Example API call:
// GET /api/projects/{project_id}/funnels/
// {
// "events": [
// {"id": "user_signed_up", "type": "events", "order": 0},
// {"id": "onboarding_completed", "type": "events", "order": 1},
// {"id": "first_action_taken", "type": "events", "order": 2}
// ],
// "funnel_window_days": 7,
// "date_from": "2026-03-01",
// "date_to": "2026-03-26"
// }Segment by User Properties
Click Add breakdown to segment your funnel by a user property (e.g., plan, signup_source, browser, account_age_days). This reveals which user groups convert better. If paid users have 70% conversion but free users have 30%, you've found a UX problem.
Adjust the Funnel Window
By default, PostHog gives users 7 days to move through all steps. If your flow should complete faster, lower the window to 24 hours. A longer window hides friction; a shorter window catches real problems.
// Adjust funnel window in PostHog UI or API
// Common windows: 24 hours (1 day), 7 days, 30 days
// Via API:
// "funnel_window_days": 1 // 24-hour window for fast flows
// "funnel_window_days": 7 // 7-day window (default)
// "funnel_window_days": 30 // 30-day window (too long, usually)Common Pitfalls
- Funnels require events to fire in exact order. If a user completes step 3 before step 2, PostHog counts them as a drop-off, not a conversion—check your event triggers.
- Setting the funnel window too long (e.g., 30 days) inflates conversion rates and masks real friction. Use a realistic window based on how fast users should move through your flow.
- Not segmenting your funnel hides broken experiences for specific user groups. Always check how different segments (plan, source, device) convert—the average can lie.
- Forgetting to capture events consistently means your funnel will have gaps. If you're tracking sign-up but not onboarding, you can't measure drop-off at that step.
Wrapping Up
Funnels in PostHog turn vague problems ('people aren't upgrading') into concrete data ('30% of free users drop off at payment'). You see exactly where friction exists and can prioritize fixes based on impact. If you want to track conversion flows automatically across tools, Product Analyst can help.