You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@BrunnerLivio
The issue may be related to the timing of when surveys are matched against the captured events—the first call to posthog.getActiveMatchingSurveys might be executed before the my_event is fully processed by PostHog's backend.
To help debug this further:
Confirm if there’s any delay in event processing by adding logs before and after posthog.capture('my_event').
Test with a longer setTimeout duration to check if the issue resolves when more time is given for event propagation.
Review the PostHog documentation or implementation details to confirm whether getActiveMatchingSurveys relies on specific event-processing timeframes.
If this is indeed a delay issue, one solution might involve ensuring a sufficient delay between event capture and survey retrieval.
Description
I have created an API survey with the Display Conditions: User sends events ->
my_event
.Given the following example
Expected behavior
I'd expect the following console output:
Current behavior
The actual console output:
Given the code snippet above, if
posthog.getActiveMatchingSurveys(console.log)
is executed again, thecallback receives the expected argument
Though I am looking for a push-based mechanism from
getActiveMatchingSurveys
rather than a pull-based, as shown in the "Expected Behavior"The text was updated successfully, but these errors were encountered: