PostHog How-to Guides

PostHog how-tos for building trends, funnels and retention, organizing dashboards and cohorts, shipping feature flags and experiments, and running surveys.

Illustration for PostHog guides

These guides are for product managers, growth teams and engineers who use PostHog for product analytics. They cover insights, dashboards, cohorts and people, feature flags, A/B tests, surveys and SQL.

PostHog guides

Build insights

You have events coming in and need to answer a question about usage, conversion or retention.

Illustration for How to create a trends insight in PostHog
PostHog7 steps2 min read

How to create a trends insight in PostHog

Build a PostHog trends insight that charts the task_created event over the last 14 days, then name it and save it so you can reopen it later.

Interactive demo
Illustration for How to create a funnel in PostHog
PostHog7 steps2 min read

How to create a funnel in PostHog

Build a PostHog funnel from signed_up to task_created to task_completed, set the last 14 days, and save it to see where users drop off between steps.

Interactive demo
Illustration for How to create a retention insight in PostHog
PostHog6 steps2 min read

How to create a retention insight in PostHog

Create a retention insight in PostHog: pick signed_up as the start event, task_created as the return event, set the last 14 days, then save it.

Interactive demo
Illustration for How to create a user paths insight in PostHog
PostHog6 steps2 min read

How to create a user paths insight in PostHog

Build a PostHog user paths insight from custom events over the last 14 days, name it clearly, and save it to see how people move through your app.

Interactive demo
Illustration for How to create a stickiness insight in PostHog
PostHog7 steps2 min read

How to create a stickiness insight in PostHog

Build a stickiness insight in PostHog to see how many days users repeat an event. Pick task_created, set Last 14 days, name it, and save.

Interactive demo
Illustration for How to create a lifecycle insight in PostHog
PostHog7 steps2 min read

How to create a lifecycle insight in PostHog

Learn how to build a lifecycle insight in PostHog that splits users into new, returning, resurrecting, and dormant, then save it for your team.

Interactive demo
Illustration for How to compare time periods in PostHog
PostHog5 steps2 min read

How to compare time periods in PostHog

Compare two periods in PostHog: set Last 7 days on a saved insight, then use Compare to previous period to see both series on one chart.

Interactive demo
Illustration for How to write a SQL query in PostHog
PostHog4 steps2 min read

How to write a SQL query in PostHog

Learn how to write a SQL query in PostHog: enter a query in the SQL editor, run it, and read a table of your most frequent events over 14 days.

Interactive demo
Illustration for How to add an annotation in PostHog
PostHog3 steps2 min read

How to add an annotation in PostHog

Learn how to add an annotation in PostHog: open Annotations, write a note such as a launch, and save it so the date is marked on your charts.

Interactive demo
Illustration for How to export an insight to CSV in PostHog
PostHog3 steps2 min read

How to export an insight to CSV in PostHog

Export a PostHog insight as a CSV file in three steps: open the saved insight, click Export under Detailed results, and choose the .csv file type.

Interactive demo

Organize dashboards

Insights are scattered and the team needs one place to check the numbers.

Understand people and events

You want to group users, look up one person, or clean up the events you count.

Ship with flags, experiments and surveys

You are rolling out a change gradually, testing variants, or asking users what they think.

Illustration for How to create a feature flag in PostHog
PostHog6 steps2 min read

How to create a feature flag in PostHog

Create a boolean feature flag in PostHog: set a key and description, release it to 100% of users, and save it so your app can toggle the feature.

Interactive demo
Illustration for How to roll out a feature flag to a percentage of users in PostHog
PostHog4 steps2 min read

How to roll out a feature flag to a percentage of users in PostHog

Learn how to roll out a PostHog feature flag to a percentage of users: open the flag, click Edit, pick a rollout percentage, and save the change.

Interactive demo
Illustration for How to target a feature flag to a cohort in PostHog
PostHog5 steps2 min read

How to target a feature flag to a cohort in PostHog

Learn how to target a PostHog feature flag to a cohort: open the flag, edit its release condition, add a cohort filter, and save the change.

Interactive demo
Illustration for How to create a multivariate feature flag in PostHog
PostHog5 steps2 min read

How to create a multivariate feature flag in PostHog

Create a multivariate feature flag in PostHog: set a unique flag key, choose the Multivariate type, name two variants at 50/50, and save the flag.

Interactive demo
Illustration for How to run an A/B test in PostHog
PostHog10 steps2 min read

How to run an A/B test in PostHog

Set up an A/B test in PostHog: name the experiment, create its feature flag, review control and test variants, add a primary metric, and save a draft.

Interactive demo
Illustration for How to create a survey in PostHog
PostHog5 steps2 min read

How to create a survey in PostHog

Create a survey in PostHog from the Open feedback template: name it, write one freeform text question, and save it as a draft before you launch it.

Interactive demo