Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(surveys): Make selector targeting work, add user props #858

Merged
merged 4 commits into from
Oct 26, 2023

Conversation

neilkakkar
Copy link
Collaborator

@neilkakkar neilkakkar commented Oct 25, 2023

Changes

implements option 3 from: PostHog/posthog#17863

and fixes PostHog/posthog#17652

~~Still need to test perf impact of the setInterval 👀 ~~ - processing takes about 2-3ms per run, and minimal CPU resources, so ok to run on a regular interval. I doubled the interval anyway to keep the check at 1/1000th of the cycle (3s cycle, 3ms per run)

Still need to add a few tests here

...

Checklist

@github-actions
Copy link

github-actions bot commented Oct 25, 2023

Size Change: +17 B (0%)

Total Size: 729 kB

Filename Size Change
dist/surveys.js 39.7 kB +17 B (0%)
ℹ️ View Unchanged
Filename Size
dist/array.full.js 178 kB
dist/array.js 119 kB
dist/es.js 119 kB
dist/module.js 119 kB
dist/recorder-v2.js 95.1 kB
dist/recorder.js 58.4 kB

compressed-size-action

@neilkakkar neilkakkar added the bump minor Bump minor version when this PR gets merged label Oct 25, 2023
@neilkakkar neilkakkar marked this pull request as ready for review October 25, 2023 15:37
@neilkakkar neilkakkar merged commit 10138ef into master Oct 26, 2023
11 checks passed
@neilkakkar neilkakkar deleted the survey-improv branch October 26, 2023 09:56
@@ -457,6 +460,9 @@ export const addCancelListeners = (
$survey_name: surveyEventName,
$survey_id: surveyId,
sessionRecordingUrl: posthog.get_session_replay_url?.(),
$set: {
[`$survey_dismiss/${surveyId}`]: true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this was still in draft mode when I looked at it yesterday :( but this is probably better as survey_dismissed

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like one can probably gather what it's meant to do even with just "survey dismiss" but we do feature_flag_called and it makes a lot more sense than if we did feature_flag_call

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bump minor Bump minor version when this PR gets merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Survey when component has changed
3 participants