Skip to content

Feature Request: More reliable cross-session/cross-device survey wait period enforcement #44150

@ordehi

Description

@ordehi

Feature request

Is your feature request related to a problem?

The seenSurveyWaitPeriodInDays setting is currently enforced entirely client-side via browser localStorage. This means the wait period only works reliably within a single browser on a single device. Users can see surveys more frequently than intended when they:

  • Switch devices
  • Switch browsers
  • Clear browser storage
  • Use incognito/private mode
  • Have a custom distinct_id set before PostHog assigns one

A customer recently saw two different surveys within 2 days despite a 30-day wait period configured, because their sessions had different device IDs and isolated localStorage.

Describe the solution you'd like

A more reliable way to enforce survey frequency limits that works across sessions and devices. This could be:

  1. Server-side filtering: Track when a user last saw a survey (via $survey_shown events or a person property) and filter surveys server-side before returning them to the client
  2. Built-in person property tracking: Automatically set a person property like $last_survey_shown_at when surveys are displayed, and allow targeting surveys based on this property
  3. Hybrid approach: Keep client-side as a fast first check, but validate against server-side state for stronger guarantees

Describe alternatives you've considered

Current workaround: Users can implement this themselves by:

  1. Setting a person property (e.g., last_survey_seen_at) whenever a survey is shown
  2. Targeting surveys to only show when that property is older than the desired wait period (or doesn't exist)

This works but adds implementation overhead for a common use case, and requires users to understand the limitation exists in the first place.

Additional context

From: https://posthoghelp.zendesk.com/agent/tickets/46093

Debug info

Kind: support

Target area: surveys

Report event: http://go/ticketByUUID/e71fd973-697a-4b12-a609-c4ecea954aec

Session: https://us.posthog.com/project/sTMFPsFhdP1Ssg/replay/019b74e8-870c-7bca-a101-e91135b4da9a?t=411

Exceptions: https://us.posthog.com/project/2/error_tracking?filterGroup=%7B%22type%22%3A%22AND%22%2C%22values%22%3A%5B%7B%22type%22%3A%22AND%22%2C%22values%22%3A%5B%7B%22key%22%3A%22%24session_id%22%2C%22value%22%3A%5B%22019b74e8-870c-7bca-a101-e91135b4da9a%22%5D%2C%22operator%22%3A%22exact%22%2C%22type%22%3A%22event%22%7D%5D%7D%5D%7D

Location: https://us.posthog.com/project/11653/surveys/019b2d23-fc81-0000-c510-b7025c9163c2

Persons-on-events mode for project: person_id_no_override_properties_on_events

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions