Command Palette

Search for a command to run...

UnylyUnyly
Back to skills

debugging-surveys

FreeNo executable scriptsNot checked

Diagnose PostHog Surveys configuration and responses across all five SDKs (web/posthog-js, iOS, Android, Flutter, React Native). Use when a survey misbehaves…

PostHogby PostHog★ 81 GitHub stars

About this skill

Debugging surveys

PostHog Surveys is a no-code in-app form builder. A survey is created in the PostHog UI; it must then be evaluated and rendered by whichever SDK the app runs. Most "survey not showing" reports are eligibility problems, not rendering bugs — the SDK correctly decided the user is not eligible, and the job is to find which gate failed and why.

Access requirements

Use PostHog MCP tools or the survey API to inspect survey configuration and responses. A checkout of the PostHog repository is not required for these diagnostic steps.

Cross-SDK feature parity (check this FIRST)

A common cause is expecting a feature that the app's platform doesn't support. Confirm the survey's lib / the app's platform before anything else, then consult this table. Verified against the SDK source — re-verify if it's been months, the gaps get filled over time.

Feature Web (posthog-js) iOS Android Flutter React Native
Rendering DOM + shadow root Native SwiftUI (SurveysWindow) No built-in UI — delegate only Dart widgets (SurveyBottomSheet) RN components (SurveyModal)
Event-based triggers yes (since 1.137.0, 2024-06-05) yes yes yes (native side) yes
URL / screen targeting yes decoded but NOT evaluated (// TODO) decoded but NOT evaluated NOT evaluated (native gap) explicitly excluded in filter
Feature-flag / cohort targeting yes yes yes yes (native side) yes
seenSurveyWaitPeriodInDays yes yes yes yes (native side) yes (≥ 4.81.5)
surveyPopupDelaySeconds yes yes (≥ 3.54.0) yes (≥ 3.49.0) yes (≥ 5.54.0) yes (≥ 4.85.0)
enable_partial_responses yes (≥ 1.240.0) yes (≥ 3.79.0) yes (≥ 3.70.0) yes (≥ 5.48.0) yes (≥ 4.75.0)
skipSubmitButton (auto-submit) yes (≥ 1.244.0) yes (≥ 3.77.0) yes (≥ 3.66.4; Compose UI ≥ 0.3.0) yes (≥ 5.45.0) yes (≥ 4.26.0)

The minimum versions match the SDK version warnings in the survey editor.

Consequences worth memorizing:

  • Popup delay, partial responses, and auto-submit need a recent mobile SDK. Check the app's SDK version against the table before blaming one of them. On older versions the delay is skipped, a survey stores one response at the end, and a rating tap never self-submits.
  • URL targeting is effectively web-only. Mobile SDKs decode the field but never enforce it; React Native filters those surveys out entirely. A mobile survey with a URL condition behaves as "no URL condition" (mobile/flutter) or "never shows" (RN).
  • Android ships no survey UI. The app (or the Flutter plugin) must provide a PostHogSurveysDelegate. "Survey never renders on Android" is often a missing delegate, not a PostHog bug.
  • Flutter is hybrid: triggering/eligibility runs in the native iOS/Android layer; rendering is Dart (SurveyService.showSurvey → showModalBottomSheet). It does not "just call native" for UI. So a Flutter rendering bug lives in Dart; a Flutter eligibility bug lives in native.
  • React Native enforces the wait period from 4.81.5. Older versions skip the check, so on those versions don't blame the wait period.

How a survey actually gets shown (the web eligibility pipeline)

The web SDK is the most complex and the most common source of reports. Mental model from packages/browser/src/extensions/surveys.tsx (checkSurveyEligibility) — checks run in order, first failure wins:

  1. isSurveyRunning — has start_date, no end_date.
  2. survey type is in-app (Popover / Widget / API).
  3. linked_flag_key enabled (if set).
  4. targeting_flag_key enabled (if set) — user-defined property targeting.
  5. _internalFlagCheckSatisfied — the auto-generated internal targeting flag.
  6. hasWaitPeriodPassed — `seenSurveyWaitPe
Full SKILL.md on GitHub

Install debugging-surveys in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

Bundled files

references/diagnostic-queries.mdreferences/reading-responses.md

FAQ

What does the debugging-surveys skill do?

Diagnose PostHog Surveys configuration and responses across all five SDKs (web/posthog-js, iOS, Android, Flutter, React Native). Use when a survey misbehaves ("survey not showing", "fewer responses than expected", "responses disappeared", "responses are incomplete", "only the first question was answered", "the user says they didn't mean to submit", "survey shows on wrong platform"), or when diagnosing why a survey does or doesn't display. Covers the eligibility pipeline, how a response actually gets stored (partial responses, branching, optional questions, auto-submit), cross-SDK feature parity, the known-cause catalog, and read-only diagnostic queries.

How do I install the debugging-surveys skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the debugging-surveys skill run scripts?

No, this skill is instructions only (SKILL.md) with no executable scripts.

Related skills

Compare debugging-surveys with