How-To2026-08-239 min read

How to Set Up Product Metrics in PostHog

PostHog is an open-source product analytics platform that combines event tracking, session recording, feature flags, and A/B testing in a single tool. For early-stage teams, PostHog reduces the complexity of managing multiple analytics vendors.

This guide covers setting up PostHog from initial instrumentation through building your first metrics dashboard.

Step-by-step guide

01

Install the PostHog snippet and enable Autocapture

Add the PostHog JavaScript snippet to your application. In the initialization config, set autocapture: true. Autocapture automatically tracks clicks, form submissions, and page views without any additional instrumentation. This gives you immediate data while you plan your custom event schema.

02

Define and instrument custom events for core actions

Identify your 10-15 most important user actions. Use posthog.capture() to track each one with a consistent naming convention: noun_verb (project_created, ticket_exported, prd_generated). Add properties to each event: the object ID, the user role, and any relevant metadata. Custom events are more reliable than Autocapture for analysis.

03

Set up Person Properties for segmentation

Use posthog.identify() when a user signs in, passing their user ID and key properties: email, plan, company name, role, and signup date. Use posthog.people.set() for properties that change over time (plan upgrades, feature flags). Person properties enable segmenting all metrics by user characteristics.

04

Build a Trends dashboard for core metrics

In PostHog, go to Insights > New Insight > Trends. Add your core active event (project_created or similar). Set the frequency to Weekly and the date range to Last 90 days. Save this as a Trend chart. Repeat for your 4-5 most important events. Add all charts to a new Dashboard named [Product] Metrics.

05

Create a Funnel insight for activation

Go to Insights > Funnel. Add your activation steps in order: user signed up, user completed onboarding, user created first project. Set the conversion window to 7 days. PostHog calculates the conversion rate at each step and shows the drop-off. Add this Funnel to your dashboard as the activation chart.

06

Set up Retention analysis for your core action

Go to Insights > Retention. Set the Starting event to your sign-up event and the Returning event to your core engagement action. PostHog displays a retention table by cohort. This shows the percentage of users who return each week after their first action — your key stickiness metric.

07

Use Session Recordings to diagnose drop-offs

In PostHog, go to Session Recordings > Filters. Filter by users who triggered your sign-up event but not your onboarding completion event. This shows you recordings of users who dropped off during onboarding. Watch 5-10 recordings to identify common friction points that quantitative data cannot explain.

Common mistakes

Relying only on Autocapture for analysis

Autocapture provides a good starting point but is unreliable for rigorous analysis — button text changes, CSS class renames, and DOM restructuring break Autocapture selectors. Always add custom events for actions that matter for product decisions.

Not calling posthog.identify() on login

Without identify(), all events before login are anonymous and cannot be attributed to a user. This breaks funnel analysis (you cannot see the full path from anonymous visit to conversion) and retention (you cannot track returning users). Always call identify() on successful login.

Ignoring the Feature Flags integration with analytics

PostHog feature flags automatically add a flag property to all events when a flag is active. This enables analyzing behavior of users in a flag group versus those not in it. Use this for every experiment and feature rollout.

Tips

Use PostHog Groups to track events at the organization level, not just the user level — essential for B2B SaaS

Set up PostHog Alerts (Webhooks) to notify Slack when a key metric drops below a threshold

Use PostHog Surveys to collect in-product feedback directly tied to user behavior data

Enable PostHog Heatmaps alongside Session Recordings to see aggregate click patterns on key pages

How Vantage helps

Vantage connects to product analytics tools to ground PRD generation in real user behavior data. When you add analytics context to a Vantage project, the AI generates specs that reference your actual activation and retention metrics rather than generic benchmarks.

Frequently asked questions

Spend less time on setup, more on decisions

Vantage connects your tools and generates specs grounded in real data. Free to start.

Free to start. No credit card required.

Related reading