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
The surveys API returns all active surveys for an apiKey, including already answered surveys since the API does not know who is requesting it (there's no distinct_id query parameter or something).
The JS SDK has to filter out already answered surveys.
Closing this in favor of PostHog/posthog-js#1652
There'll be many more benefits with surveys being a static file + caching, which means some code dupe on the client side, but it's worth it.
context https://posthog.slack.com/archives/C07QD3LT8U9/p1738359117136199
The surveys API returns all active surveys for an apiKey, including already answered surveys since the API does not know who is requesting it (there's no distinct_id query parameter or something).
The JS SDK has to filter out already answered surveys.
The current API is a GET https://us.i.posthog.com/api/surveys/?token=apiKey&ip=1&_=12345678&ver=1.211.2
The text was updated successfully, but these errors were encountered: