Survey targeting
When you create a survey, it'll save as a draft until you're ready to launch it. You can target your survey to specific users based on:
- Page URL contains. You can target a survey to a specific page URL, or a page URL that contains a specific string. For example, you can target a survey to
https://posthog.com/docs
orhttps://posthog.com/docs/*
with the string "/docs". - Selector. You can target a survey based on whether a specific element appears on your page with either class name or ID. For example, you can target a survey with
#my-button
or.my-button
. - Linked feature flag. You can target a survey to users who have a specific feature flag enabled. For example, you're rolling out a new feature flag "new-landing-page" and want to gather feedback only from users who have that flag enabled.
- User/group properties. You can target a survey to users who have a specific user or group property. For example, you can target a survey to users who have a property
is_paying
set totrue
.
All targeting properties behave in a "AND" manner, meaning that a survey will only be shown to a user if all of the above conditions are met.