Repository navigation
feat!: enable surveys by default - #984
Open
turnipdabeets wants to merge 2 commits into
Open
turnipdabeets wants to merge 2 commits into
turnipdabeets wants to merge 2 commits into
Conversation
Match the iOS, Flutter, React Native, web and KMP SDKs. Surveys still display only with posthog-android-surveys-compose or a custom surveysDelegate.
This was referenced Nov 16, 2026
Contributor
There was a problem hiding this comment.
PostHog Review · Standard · reviewed be906a4: 1 Should fix.
See this review and its findings in PostHog Review. Comment @posthog review --deep for a Deep review. A Deep review takes longer and looks deeper than a Standard review.
Contributor
posthog-android Compliance ReportDate: 2026-11-16T16:52:55.618700+00:00 ✅ All Tests Passed!232/232 tests passed Capture_V1 Tests✅ 105/105 tests passed View Details
Capture_Ai_V1 Tests✅ 110/110 tests passed View Details
Feature_Flags Tests✅ 17/17 tests passed View Details
|
marandaneto
approved these changes
Nov 16, 2026
Without posthog-android-surveys-compose or a custom surveysDelegate, the default delegate only logs, so matching evaluated linked flags (capturing $feature_flag_called) and property-filter regexes for surveys nobody could see.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
💡 Motivation and Context
Flips
PostHogConfig.surveysto default totruein 4.0, following up on this comment on posthog-kmp#125: sync config defaults across the mobile SDKs.Android is the only SDK that defaults surveys off:
surveysdefaulttruetruetrue(disableSurveys = false)truetruefalsefalsemade sense when Android had no built-in survey UI and the flag only existed so hybrid SDKs could attach their own display logic. Now thatposthog-android-surveys-compose(#541) provides that UI, the default just means adding the module isn't enough on its own; you also have to find and flip the flag.What changes for apps:
PostHogSurveysIntegration. The integration then skips matching (bb699a9), sincePostHogSurveysDefaultDelegateonly logs. Without that check, a flag-linked survey would send$feature_flag_calledand run property-filter regexes oncapture()for surveys nobody can see.surveysDelegate: matching surveys start showing. Those apps almost certainly setsurveys = truealready, because the module did nothing without it. The rare app that added the module but kept surveys off on purpose needssurveys = false; that's covered inMIGRATION.md("Check surveys").Also rewrites the KDoc, which still said "Intended for internal use only… Defaults to false", and drops the now-redundant
surveys = truefrom the sample app.💚 How did you test it?
surveys is enabled by defaulttoPostHogConfigTest.PostHogSurveysNoRendererTest. It fails without bb699a9 (isFeatureEnabledcalled) and passes with it.PostHogSurveysEventPropertyFilterTestnow sets a mock delegate, as the other survey tests already do../gradlew :posthog:test :posthog-server:test :posthog-android:testDebugUnitTest :posthog-android-surveys-compose:testDebugUnitTest,spotlessCheckandapiDump(no API change) pass locally.📝 Checklist
If releasing new changes
pnpm changesetto generate a changeset file🤖 Agent context
Autonomy: Human-driven (agent-assisted)
surveys = truedoes on Android: remote config survey caching,PostHogSurveysIntegration, and delegate discovery.main, since a default flip is a behavior change.surveys = true.🤖 Generated with Claude Code