posthog icon indicating copy to clipboard operation
posthog copied to clipboard

fix(survey): Add filter conditions to not show survey to users who've submitted/dismissed a survey.

Open Phanatic opened this issue 1 year ago • 2 comments

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?

  1. Manually tested the code on my local machine.
  2. Added automated tests to ensure that current functionality didn't break.

Phanatic avatar May 07 '24 18:05 Phanatic

📸 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.

👉 Review this PR's diff of snapshots.

posthog-bot avatar May 10 '24 17:05 posthog-bot

Size Change: 0 B

Total Size: 1.05 MB

ℹ️ View Unchanged
Filename Size
frontend/dist/toolbar.js 1.05 MB

compressed-size-action

github-actions[bot] avatar May 10 '24 17:05 github-actions[bot]