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

chore: update the dismissed survey logic #24224

Merged
merged 1 commit into from
Aug 7, 2024

Conversation

zlwaterfield
Copy link
Contributor

Problem

We've got two issues:

  1. We have an instance of the billing product logic for each product, so when we use kea listener success callbacks, they trigger multiple times (one for each instance) and, in this case, ten times. This was a problem for two reasons - first, we were triggered survey dismissed calls ten times for every unsubscribe modal submission, and second, there was no Survey ID since the Survey ID is only set on the logic for the product being unsubscribed.
  2. We are submitting the survey dismissed event when the unsubscription modal is submitted without an answer from the customer - this seems wrong. We still want to track the subscription and pipe it into Slack even if there is no answer.

Changes

This PR fixes the multiple callback firing by checking for the Survey ID. Note that there's probably a deeper fix that should occur where listener callbacks are not used in logic with multiple instances. This PR also updates the unsubscription submission with no answers to use the survey sent—this will pip those in Slack through Zapier.

@zlwaterfield zlwaterfield self-assigned this Aug 6, 2024
Copy link
Contributor

github-actions bot commented Aug 6, 2024

Size Change: 0 B

Total Size: 1.07 MB

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

compressed-size-action

@zlwaterfield zlwaterfield changed the title fix: fix the dismissed survey logic chore: update the dismissed survey logic Aug 6, 2024
@zlwaterfield zlwaterfield merged commit b97089b into master Aug 7, 2024
96 checks passed
@zlwaterfield zlwaterfield deleted the zach/fix-dismissed-survey branch August 7, 2024 14:22
silentninja pushed a commit to silentninja/posthog that referenced this pull request Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants