PostHog / PostHog/posthog-android

Surveys: Support partial response collection

Open
#390 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement Survey
Dominant language
Kotlin
Stars
90
Forks
49
Avg merge
2d 5h
Merged PRs (30d)
61

Description

🚨 IMPORTANT

This issue is likely user-facing in the main PostHog app, see surveyVersionRequirements.ts. If you delete or close this issue, be sure to update the version requirements list there.

Summary

The posthog-android SDK does not support partial response collection for surveys.

Current State

  • The enable_partial_responses / enablePartialResponses field is not present in the Survey model
  • Currently, responses are only sent when the survey is fully completed

Expected Behavior

When enable_partial_responses is enabled on a survey:

  1. The SDK should track responses incrementally as the user answers each question
  2. When a user dismisses or abandons a survey without completing it, the partial responses should be captured
  3. Events should include $survey_partially_completed: true property when responses exist but survey isn't complete
  4. Question shuffling should be disabled when partial responses are enabled (responses are tracked by question ID)

Reference Implementation

See posthog-js browser: packages/browser/src/extensions/surveys/surveys-extension-utils.tsx

  • _surveyHasResponses() function checks if any responses exist
  • _buildSurveyEventProperties() includes $survey_partially_completed property
  • getDisplayOrderQuestions() disables shuffling when enable_partial_responses is true

Tracking

This is tracked in the survey SDK feature parity issue: https://github.com/PostHog/posthog/issues/45658

This issue was generated by Claude during a Surveys SDK audit.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the referenced browser implementation in packages/browser/src/extensions/surveys/surveys-extension-utils.tsx, then locate the corresponding survey model, response collection, event-building, and question-ordering entry points in the Android SDK. The work is complete when partial responses are captured on dismissal, events include $survey_partially_completed when appropriate, and question shuffling is disabled; also check frontend/src/scenes/surveys/surveyVersionRequirements.ts if the issue is closed or deleted.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.