Supported on: iOS SDK
1.0.61+ · Android SDK 1.0.33+ · React Native SDK 1.0.4+How It Works
Surveys are configured in the Console with content, question types, and trigger rules. Like in-app messages, they can appear automatically when trigger conditions are met — no code required for trigger-based surveys.Present a Survey Manually
present returns once the survey request has been dispatched to the native SDK. Whether the survey actually appears depends on the survey’s status, audience, and trigger rules configured in the Console — the SDK fires the survey_presented analytics event (and your delegate’s onSurveyPresented callback) when it does. If you need to confirm that a survey was shown to the user, observe the delegate rather than the return value.
Module Access
Module Methods
8 Question Types
Surveys support the following question types, configured in the Console:Question types and their content are defined entirely in the Console. The SDK renders them automatically based on the survey configuration.
AppDNASurveyDelegate
All 3 methods on this delegate fire from the native survey pipeline alongside the existing analytics events. Register your delegate viaAppDNA.surveys.setDelegate(...).
onSurveyPresented(surveyId)— fires when the survey view appears (alongside thesurvey_shownevent).onSurveyCompleted(surveyId, responses)— fires when the user submits the final question.responsesis aRecord<string, unknown>keyed by question ID containing the user’s answers, suitable for forwarding to your own analytics or CRM.onSurveyDismissed(surveyId)— fires when the user closes the survey before completing it (X button, swipe-to-dismiss, outside tap).
Response Shape
Theresponses object passed to onSurveyCompleted is keyed by questionId. Value types follow the question type:
Rich Media
Survey questions support rich media content configured in the Console:- Header images — add images above survey questions
- Icons in options — use icon references in choice options (Lucide, SF Symbols, Material, or emoji)
- Thank-you animations — Lottie or confetti effects on survey completion
- Haptic feedback — triggered on option selection and submission
Auto-Tracked Events
Full Example
Surveys are created in the Console under Feedback > Surveys. Trigger-based surveys appear automatically — manual presentation with
present() is for cases where you want precise control over timing.
