Getting feedback is critical to building a successful product. Metrics and analytics are key pieces of feedback, but at an early stage, written feedback and interviews are even better. To maximize the amount of feedback you get, you need processes, but these are often time-consuming.
PostHog’s surveys help automate the process of getting feedback and booking interviews. In this tutorial, we show how to set up surveys to do both.
Getting your app ready for surveys
opt_in_site_apps: true to the initialization of either of these. For the snippet, this looks like this:
Next, opt into the surveys beta by opening the account dropdown in the top right of your PostHog instance, selecting "Enable beta features," and then activating "Surveys."****
Finally, enable and save the "Surveys" site app in the "Browse Apps" tab.
Creating your first feedback survey
Once you’ve set up your app to use surveys, you can create your first one to gather feedback. To do this, go to the surveys tab in your PostHog instance and click "New survey." On this page, add a name and question. In this example, we ask for feedback on an imaginary product named "HogBox" and its upload feature, so our question reflects this. We also want to target the
/upload URL so we include that under "Targeting."
Feel free to add a description or change any of the style options and press "Save as draft" once ready. On the overview page, you can click "Launch" because we already did all the setup. Once launched, you see the prompt in your app and results are captured into PostHog for you to see.
Using surveys to book user interviews
You can also use the surveys feature to show a prompt to users to book interviews.
To control who sees the prompt, we can use a feature flag. To create one, go to the feature flags tab and click "New feature flag." Add a key (like
user-interview), release conditions like 100% of users where the country code is
GB, and press save.
Next, go to the surveys tab and click "New survey." Add a name like "User interview," link the
user-interview feature flag you just created, change the type from "Open text" to "Link," add your question, booking link, and change the "Submit button text." Altogether, this might look like this:
Once you customize it to your liking, click "Save as draft" and then "Launch" to show it to all the users in the flag rollout.