fix(survey): Add filter conditions to not show survey to users who've submitted/dismissed a survey.
Problem
Fixes https://github.com/PostHog/posthog/issues/22145 posthog-js changes are in https://github.com/PostHog/posthog-js/pull/1181
This PR adds a third targeting flag to the Survey model called internal_targeting_flag which will hold hidden system-level conditionals for showing/hiding surveys. We will implement support for this in the getActiveMatchingSurveys matcher in posthog-js to hide any surveys that have a value of false for this flag.
Changes
Added a third targeting flag to the Survey model called custom_targeting_flag which will hold hidden system-level conditionals for showing/hiding surveys.
Does this work well for both Cloud and self-hosted?
Yes
How did you test this code?
- Manually tested the code on my local machine.
- Added automated tests to ensure that current functionality didn't break.
📸 UI snapshots have been updated
2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
-
chromium: 0 added, 2 modified, 0 deleted (diff for shard 2) -
webkit: 0 added, 0 modified, 0 deleted
Triggered by this commit.
Size Change: 0 B
Total Size: 1.05 MB
ℹ️ View Unchanged
| Filename | Size |
|---|---|
frontend/dist/toolbar.js |
1.05 MB |