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:
- For the Single choice question type, you can specify the next step based on the selected answer.
- 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.
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..
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.