Conditional questions

Last updated:

|Edit this page

It is useful to be able to display survey questions conditionally. For example, you may want to ask follow-up questions based on a user's responses. PostHog offers several ways to do this:

Simple branching

For every question type, you can define the next step to navigate to after a question is completed. Click on After this question, go to:, then choose the next step you want to transition to. The options are:

  • Next question
  • Any specific question
  • Confirmation message (if present) or End

Response-based conditions

For the single choice and rating question types, you can define the next step based on the response received.

Click on After this question, go to:, and then choose Specific question based on answer. Depending on your question type, this will present the following options:

  1. For the Single choice question type, you can specify the next step based on the selected answer.
Survey single choice branching
  1. For the Rating question type, you can specify the next step based on the response bucket received. For example, for a rating question with a scale from 1 to 5, the responses will be bucketed into categories: negative, neutral, and positive. The conditions are executed based on which bucket the individual response falls into.
Survey rating branching

By default, a question proceeds to the next question in the survey unless specified otherwise. If you want a question to be the last one, but it is not the final question in the list, you need to explicitly set the value for After this question go to to Confirmation message (if present) or End..

Survey end branching

Testing

We currently don't have the ability to test the survey flow interactively via preview, but we will add this feature soon. In the meantime, we recommend testing the branching flows by first releasing the survey to yourself.

Questions?

Was this page useful?

Next article

Data pipelines: CDP integrations

Data pipeline provides a full-featured customer data platform (CDP) in PostHog, with full-service integrations for ingesting, transforming, and sending data to destinations: Transformations extend PostHog's functionality by filtering and transforming analytics data. Sources let you ingest data from your existing systems, and join them to existing person and event data using data warehouse . Destinations send PostHog data to other sources in realtime or as batch exports which reliably…

Read next article