-
Notifications
You must be signed in to change notification settings - Fork 2.1k
feat(surveys): add cross-sell button to funnel insights #41703
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
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
11526f8 to
1fb0030
Compare
Migration SQL ChangesHey 👋, we've detected some migrations on this PR. Here's the SQL output for each migration, make sure they make sense:
|
🔍 Migration Risk AnalysisWe've analyzed your migrations for potential risks. Summary: 0 Safe | 1 Needs Review | 0 Blocked
|
1fb0030 to
a475441
Compare
a475441 to
bc9b976
Compare
755e84f to
d2d3fa8
Compare
bc9b976 to
32394e7
Compare
d2d3fa8 to
d402eb6
Compare
32394e7 to
7ead735
Compare
7ead735 to
32e402b
Compare
d402eb6 to
be98be3
Compare
|
Size Change: +93 B (0%) Total Size: 3.4 MB ℹ️ View Unchanged
|
e28f35f to
aacae82
Compare
aacae82 to
465ab39
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
13 files reviewed, 1 comment
| const { nameSortedDashboards } = useValues(dashboardsModel) | ||
| const otherDashboards = nameSortedDashboards.filter((nsdb) => nsdb.id !== dashboard?.id) | ||
| const { featureFlags } = useValues(featureFlagLogic) | ||
| const { data: surveyLinkedInsights, loading: surveyLinkedInsightsLoading } = useSurveyLinkedInsights() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: calling useSurveyLinkedInsights() unconditionally makes API request even when feature flag is disabled
| const { data: surveyLinkedInsights, loading: surveyLinkedInsightsLoading } = useSurveyLinkedInsights() | |
| const { data: surveyLinkedInsights, loading: surveyLinkedInsightsLoading } = featureFlags[FEATURE_FLAGS.SURVEYS_FUNNELS_CROSS_SELL] ? useSurveyLinkedInsights() : { data: new Set<number>(), loading: false } |
Prompt To Fix With AI
This is a comment left during a code review.
Path: frontend/src/scenes/dashboard/DashboardItems.tsx
Line: 59:59
Comment:
**style:** calling `useSurveyLinkedInsights()` unconditionally makes API request even when feature flag is disabled
```suggestion
const { data: surveyLinkedInsights, loading: surveyLinkedInsightsLoading } = featureFlags[FEATURE_FLAGS.SURVEYS_FUNNELS_CROSS_SELL] ? useSurveyLinkedInsights() : { data: new Set<number>(), loading: false }
```
How can I resolve this? If you propose a fix, please make it concise.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
conditional hooks huh 🫨
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(ig this is valid tho i’ll fix it a different way)
465ab39 to
6dacd51
Compare
arthurdedeus
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
feels like I've reviewed this before, looks good though
you have haha, sorry about that - had to break it down into different PRs to pass migration checks thank you!! |
a848bcc to
0fee956
Compare
0fee956 to
c640776
Compare

Problem
survey adoption is incredibly low. my hypothesis is that "surveys" in the sidebar/nav is meaningless to users, and surveys will generally continue to be meaningless until we tell users why they need surveys, what to ask in them, and how to build them.
Changes
survey-funnels-cross-sell, which is currently disabledoriginal PR: #41574
this PR introduces a new "Ask users why" button on up to 1 funnel insight per dashboard that launches PostHog AI with context about the insight, and a prompt to create a survey.
new survey field:
linked_insight_idadded this new field to the survey model so that we don't show the "ask users why" button if the user has already created a survey from this insight
(this PR just adds an index to the db, three previous PRs were merged with additional migrations)
opportunity logic
very simple right now:
surveys.linked_insight_id)this logic caps "low conversion rate" at <50%, so if there are no funnels with worse than 50% conversion, nothing will be returned.
behavior
How did you test this code?
tested locally
Changelog: (features only) Is this feature complete?
not yet :)