### Unity SDK iOS Installation Steps Source: https://developers.survicate.com/mobile-sdk/unity This snippet details the manual steps required to install the Survicate iOS SDK within a Unity project, including file placement and Xcode project configuration for linking the necessary framework. ```iOS 1. Add content of the iOS directory to your Assets/Plugins/iOS 2. Add SurvicatePluginIOS.cs and file inside your Assets/Plugins 3. Download the latest iOS SDK from https://repo.survicate.com/latest/ios/Survicate.zip. Copy this file to your xcode project folder. 4. Inside your exported Xcode project, on Build Phases -> Link Binary With Libraries, add survicate.xcframework ``` -------------------------------- ### Unity SDK Android Installation Steps Source: https://developers.survicate.com/mobile-sdk/unity This snippet outlines the manual steps for installing the Survicate Android SDK in a Unity project, covering file placement, Maven repository definition, and adding the SDK dependency to the app's build.gradle file. ```Android 1. Add content of the Android directory to your Assets/Plugins/Android 2. Add SurvicatePluginAndroid.cs file inside your Assets/Plugins 3. Define https://repo.survicate.com Maven repository in the project 4. Add Survicate SDK dependency to your app's build.gradle file. ``` -------------------------------- ### Install Survicate React Native SDK in CLI Projects Source: https://developers.survicate.com/mobile-sdk/react-native This snippet provides the commands to install the Survicate React Native SDK using npm for React Native CLI projects. It includes the primary installation command and an optional linking command for older React Native versions (pre-0.60) that do not support autolinking. ```Shell npm install @survicate/react-native-survicate --save react-native link @survicate/react-native-survicate ``` -------------------------------- ### Survicate Android SDK Initialization and Screen Tracking Source: https://developers.survicate.com/mobile-sdk/android This API documentation describes core methods for initializing the Survicate SDK and tracking user screen interactions. The `init()` method is used for initial SDK setup, while `enterScreen()` and `leaveScreen()` are crucial for screen-based survey targeting, allowing the SDK to know which screens are active. ```APIDOC Survicate.init() - Initializes the Survicate SDK. Should be called once, typically during application startup. - Parameters: None - Usage Note: User attributes are cached after initialization; they do not need to be provided after each `init()` call. Survicate.enterScreen(screenName: String) - Notifies the SDK that a user has entered a specific screen. - Parameters: - screenName: The name of the screen (case-sensitive) the user has entered. - Usage Note: Multiple active screens are allowed. Calling `enterScreen()` does not automatically discard the previous screen. Ensure `screenName` matches declarations in the Survicate panel for proper targeting. Survicate.leaveScreen(screenName: String) - Notifies the SDK that a user has left a specific screen. - Parameters: - screenName: The name of the screen (case-sensitive) the user has left. - Usage Note: Must be called when a screen is no longer considered active to prevent incorrect targeting. ``` -------------------------------- ### Manage Survicate SDK Initialization and Workspace Key Source: https://developers.survicate.com/mobile-sdk/react-native This entry documents the evolution of SDK initialization and workspace key management. The `initialize` method has been removed and replaced by `initializeSdk` for explicit SDK setup. Additionally, the `setWorkspaceKey` method has been introduced, allowing developers to programmatically configure the workspace key. ```APIDOC initialize() - REMOVED: This method is no longer available for SDK initialization. Use `initializeSdk` instead. initializeSdk() - NEW: Initializes the Survicate SDK. This method replaces the deprecated `initialize` method and must be called to set up the SDK. setWorkspaceKey(key: String) - NEW: Sets the workspace key for the Survicate SDK programmatically. - Parameters: - key: The string representing the Survicate workspace key. ``` -------------------------------- ### Comparison of Survicate Web Package vs. Web Surveys Wrapper Source: https://developers.survicate.com/javascript/installation This documentation compares the key features and integration characteristics of two distinct NPM packages offered by Survicate for JavaScript applications: the Survicate Web Package and the Survicate Web Surveys Wrapper. It highlights their differences in integration type, HTML impact, security, TypeScript support, version update mechanisms, and availability. ```APIDOC Survicate Web Package: - Integration Type: Direct integration in JavaScript applications - HTML Impact: Does not add any script to the HTML document - Security: Prioritizes security, no external scripts required - TypeScript Support: Includes TypeScript type definitions - Version Updates: Manual updates for new SDK versions - Availability: Exclusive for enterprise plan subscribers Survicate Web Surveys Wrapper: - Integration Type: Installation of Survicate tracking code - HTML Impact: Adds script to the HTML document - Security: (Not specified, implies less emphasis on 'no external scripts') - TypeScript Support: Includes TypeScript type definitions - Version Updates: Automatically uses the latest Survicate SDK version - Availability: Available for all users ``` -------------------------------- ### Survicate Data Export API Authentication Source: https://developers.survicate.com/data-export/setup This snippet details the authentication method for the Survicate Data Export API. It specifies that an API key, found in the 'Surveys Settings' under 'Access Keys' in the Survicate panel, must be provided in the 'Authorization' header of API requests. The format for the header is 'Basic {{apiKey}}'. ```APIDOC Authentication Method: Type: API Key Location: Request Header Header Name: Authorization Format: Basic {{apiKey}} Details: - The API key is found in the Survicate panel under 'Surveys Settings' > 'Access Keys'. - Replace '{{apiKey}}' with your actual API key. - Example: Authorization: Basic your_actual_api_key_here ``` -------------------------------- ### Survicate Data Export API Rate Limiting Source: https://developers.survicate.com/data-export/setup This snippet describes the rate limiting policies enforced by the Survicate Data Export API to manage traffic and maintain service stability. It specifies limits on concurrent requests and total requests per minute per workspace, and the HTTP status code returned upon exceeding these limits. ```APIDOC Rate Limiting Policies: Concurrent Request Limit: - Maximum: 5 simultaneous API requests. - Recommendation: Design systems to wait for a response before initiating another request. Workspace Request Limit: - Maximum: 1000 requests per minute for each workspace. Exceeding Limits: - Response Status Code: 429 Too Many Requests - Action: Manage requests to stay within bounds for uninterrupted API access. ``` -------------------------------- ### Unity SDK Legacy Android Configuration Source: https://developers.survicate.com/mobile-sdk/unity This snippet provides instructions for the legacy Android SDK configuration, involving manual AAR file placement, plugin platform selection in Unity, and adding external dependencies. ```Android 1. Download the latest android SDK from https://repo.survicate.com/latest/android/Survicate.aar. Place the downloaded AAR file inside Assets/Plugins/Android 2. Make sure Android is selected as plugin platform on Inspector window 3. Add dependencies listed in developers documentations here: https://developers.survicate.com/mobile-sdk/android/#installing-manually 4. Configure your workspace key in AndroidManifest.xml file. ``` -------------------------------- ### Initialize Survicate SDK Source: https://developers.survicate.com/mobile-sdk/unity Initializes the Survicate SDK within your Unity application. This method should be called only once, typically in the main script of your project, to ensure the SDK is ready to function. ```APIDOC Survicate.Initialize() - Description: Initializes the Survicate SDK. - Parameters: None. - Returns: void. - Usage Notes: Call this method only once in the application's lifecycle, preferably in the main script. ``` -------------------------------- ### Unity SDK Android Configuration Source: https://developers.survicate.com/mobile-sdk/unity This snippet describes the configuration steps for the Survicate Android SDK, including setting the workspace key in AndroidManifest.xml, defining the Maven repository, and adding the SDK dependency in build.gradle. ```Android 1. Configure your workspace key in AndroidManifest.xml file. 2. Define https://repo.survicate.com Maven repository in one of the following ways: 3. Add Survicate SDK dependency to your app's build.gradle file. ``` -------------------------------- ### Survicate JavaScript SDK Initialization and Core Methods Source: https://developers.survicate.com/javascript/methods This section details the core methods for initializing the Survicate JavaScript API and managing visitor interactions. It covers asynchronous initialization, retrieving the API instance, setting visitor attributes, triggering survey retargeting, obtaining unique visitor IDs, and resetting visitor data. ```APIDOC initSurvicate(): Promise - Description: Asynchronously initializes the Survicate JavaScript API. This should be called once before using other methods. - Note: In the Web Surveys wrapper, this is an asynchronous operation and its resolution should be awaited. getSurvicateInstance(): SurvicateAPIInstance - Description: Retrieves the initialized Survicate API instance after `initSurvicate` has resolved. - Returns: An object representing the Survicate API instance, through which other methods can be called. setVisitorTraits(attributes: object): void - Description: Sets custom attributes for the current visitor. These attributes can be used for targeting or data enrichment. - Parameters: - attributes: An object where keys are attribute names (strings) and values are the corresponding attribute values (strings, numbers, booleans). - Note: Attributes are updated locally immediately but become visible in Survicate's backend only after the visitor answers a survey question. retarget(): void - Description: Triggers an additional execution of the survey targeting script. This is useful for Single Page Applications (SPAs), Progressive Web Applications (PWAs), or after asynchronous operations where the page content or state changes without a full page reload. - Purpose: Ensures surveys are re-evaluated based on current conditions. getVisitorId(): string | null - Description: Retrieves the unique ID assigned to the visitor by Survicate. This ID is assigned only after the visitor has answered at least one survey question. - Returns: A string representing the unique visitor ID, or `null` if the visitor has not yet answered any survey questions. destroyVisitor(callback?: Function): void - Description: Removes the user's browser data related to Survicate, including session history and survey responses, from localStorage and sessionStorage. This effectively 'resets' the visitor's state from the browser's perspective. - Parameters: - callback: An optional function to execute after the visitor data has been destroyed. This can be used to trigger subsequent actions, such as `retarget`. - Caution: - Responses already saved in the Survicate database remain untouched. - If a user matches a survey's targeting criteria after destruction, they might encounter the same survey again. - If called while a survey is in progress, the survey will close, and the user will not be able to complete it. ``` -------------------------------- ### Initialize Survicate SDK Source: https://developers.survicate.com/mobile-sdk/react-native Initializes the Survicate SDK. This method should be called only once during the application's lifecycle, typically in the main component (e.g., `src/App.js`), to set up the SDK for use. ```APIDOC Survicate.initializeSdk(): void - Description: Initializes the Survicate SDK. Must be called once. - Parameters: None - Returns: void ``` ```JavaScript import Survicate from '@survicate/react-native'; // In your main component (e.g., App.js) Survicate.initializeSdk(); ``` -------------------------------- ### Configure Survicate SDK for iOS Source: https://developers.survicate.com/mobile-sdk/react-native This snippet details the configuration process for the Survicate SDK on iOS. It requires adding a 'Survicate' dictionary and a 'WorkspaceKey' string to your Info.plist file, followed by running 'pod update' to ensure all dependencies are correctly linked. ```XML Survicate WorkspaceKey YOUR_WORKSPACE_KEY ``` ```Shell # In your iOS directory pod update ``` -------------------------------- ### Unity SDK iOS Info.plist Configuration Source: https://developers.survicate.com/mobile-sdk/unity This snippet details how to configure the Survicate workspace key in the iOS Info.plist file by creating a 'Survicate' dictionary and defining the 'WorkspaceKey' string within it. ```Plist 1. Add workspace key to your Info.plist file. * Create Survicate Dictionary. * Define WorkspaceKey String in Survicate Dictionary. Your Info.plist file should looks like this: Survicate WorkspaceKey YOUR_WORKSPACE_KEY 2. Run pod update in your ios directory. ``` -------------------------------- ### Configure Survicate SDK for Android Source: https://developers.survicate.com/mobile-sdk/react-native This section outlines the necessary steps to configure the Survicate SDK for Android applications. It involves setting the workspace key within the AndroidManifest.xml file and adding the Survicate Maven repository to the project's build.gradle file. ```XML ``` ```Gradle // In project build.gradle (under android directory) allprojects { repositories { maven { url 'https://survicate.github.io/survicate-android-sdk' } } } ``` -------------------------------- ### Survicate iOS SDK Event Listeners and Answer Object Properties Source: https://developers.survicate.com/mobile-sdk/ios Documents the event listeners available in the Survicate SDK, allowing applications to react to user interactions with surveys. It also describes the properties of the `SurvicateAnswer` object, which provides details about answered questions. ```APIDOC Survicate SDK Event Listeners: - survey_displayed: Occurs when a survey is loaded and appears in the User Interface. - question_answered: Occurs after a question is answered (Survicate stores incomplete survey submissions). - survey_closed: Occurs when a user closes the survey using the close button. - survey_completed: Occurs when a user finishes the survey. SurvicateAnswer Object Properties (from QuestionAnsweredEvent.answer): - type (String): Answer type. One of: ['text', 'single', 'multiple', 'smiley_scale', 'rating', 'csat', 'numerical_scale', 'nps', 'date', 'form', 'matrix', 'button_close', 'button_next', 'button_link']. - id (Integer): Answer ID. Applicable only for types: ['single', 'smiley_scale', 'csat', 'rating', 'numerical_scale']. - ids (Integer[]): Selected answer IDs. Applicable only for type = ['multiple']. - value (String?): Text representation of an answer (e.g., "Happy" for smiley scale). `nil` for skipped questions. Not applicable for call-to-action answers: ['button_close', 'button_next', 'button_link']. - Note: Currently, `id`, `ids`, and `value` properties are passed only for the enlisted cases. Other answer objects may only consist of the `type` property. ``` -------------------------------- ### Manage Screen Tracking for Survey Targeting Source: https://developers.survicate.com/mobile-sdk/unity These methods allow you to inform the Survicate SDK about the user's current screen, enabling surveys to be targeted based on screen names. Ensure `EnterScreen()` is called when a user enters a screen and `LeaveScreen()` when they exit, as multiple active screens are supported. ```APIDOC Survicate.EnterScreen(screenName: string) - Description: Notifies the SDK that the user has entered a specific screen. - Parameters: - screenName: The name of the screen (case-sensitive) the user has entered. - Returns: void. - Usage Notes: The screen name must exactly match what is declared in the Survicate panel for targeting to work. Survicate.LeaveScreen(screenName: string) - Description: Notifies the SDK that the user has left a specific screen, marking it as inactive. - Parameters: - screenName: The name of the screen (case-sensitive) the user has left. - Returns: void. - Usage Notes: Call this method when a screen is no longer active to prevent it from being considered for targeting. ``` -------------------------------- ### Configure Survicate Expo Plugin Source: https://developers.survicate.com/mobile-sdk/react-native Instructions for adding the Survicate config plugin to an Expo project's `app.json` or `app.config.js` file. This plugin handles native module linking for the SDK. Note that any changes to plugins require rebuilding the native application. ```JSON { "expo": { "plugins": [ "survicate-react-native" ] } } ``` -------------------------------- ### Survicate JavaScript SDK Event Listener Methods and Events Source: https://developers.survicate.com/javascript/events This section describes the core methods for managing event listeners in the Survicate JavaScript SDK and details the various events that can be listened to. Events allow for custom actions in response to user interactions with surveys, such as displaying, answering questions, or completing a survey. The `SurvicateReady` event is specifically for script loading. ```APIDOC Survicate JavaScript SDK Event Listener Methods: _sva.addEventListener(eventName: string, listener: function, listenerId?: string): string - Purpose: Registers a new event listener for a specified Survicate event. - Parameters: - eventName (string): The name of the event to listen for (e.g., 'survey_displayed', 'question_answered'). - listener (function): The callback function to execute when the event occurs. This function receives an event object as its argument. - listenerId (string, optional): An optional unique identifier for the listener. If not provided, one will be generated. - Returns: string - The unique `listenerId` for the registered listener. - Notes: Multiple listeners can be set for the same event by calling this method multiple times. _sva.removeEventListener(eventName: string, listenerId?: string): void - Purpose: Removes previously registered event listeners. - Parameters: - eventName (string): The name of the event from which to remove listeners. - listenerId (string, optional): The specific `listenerId` of the listener to remove. If omitted, all listeners for the given `eventName` will be removed. - Returns: void Survicate JavaScript SDK Events: survey_displayed - Description: Emitted every time a survey is displayed to a visitor. - Event Object: Contains information about the displayed survey. question_answered - Description: Emitted as soon as a visitor answers a question within a survey. - Event Object: Contains information about the survey and the `answer` object with details about the response. - Note: Events are emitted asynchronously; answer data might not be immediately reflected in Survicate. survey_completed - Description: Emitted once a survey has been completed by a visitor, meaning all displayed questions in the configured flow have been answered. - Event Object: Contains information about the completed survey. survey_closed - Description: Emitted if a visitor clicks the close button at any stage of the survey. - Event Object: Contains information about the closed survey. SurvicateReady - Description: Emitted when the Survicate script has been fully loaded and is ready for use. This event is attached to the `window` object, not `_sva`. - Applicable: Primarily for manual installations and Single Page Applications/Progressive Web Applications. - Event Object: No specific details provided, typically indicates readiness. ``` -------------------------------- ### Fix Android Network Capabilities Method Source: https://developers.survicate.com/mobile-sdk/react-native An issue causing occasional exceptions during SDK initialization related to Android's `getNetworkCapabilities` method has been resolved. This fix improves the stability of the SDK's startup process on Android devices. ```APIDOC Android.getNetworkCapabilities() - FIX: Resolved an issue that could cause occasional exceptions during SDK initialization on Android devices. ``` -------------------------------- ### Deprecated and Recommended User Trait Setting Methods Source: https://developers.survicate.com/mobile-sdk/unity This entry documents the deprecation of the `SetUserTrait(string, string)` method and introduces the recommended `SetUserTrait(UserTrait)` method for setting user attributes in the Unity SDK. The new method supports a wider range of data types for user attributes, including numbers, booleans, and datetimes, aligning with updated user attribute capabilities. ```APIDOC SetUserTrait(string key, string value) - Deprecated: Use SetUserTrait(UserTrait) instead. - Purpose: Sets a user trait with a string key and string value. - Parameters: - key: The name of the user trait (string). - value: The value of the user trait (string). SetUserTrait(UserTrait trait) - Recommended: Replaces the deprecated string-based method. - Purpose: Sets a user trait using a UserTrait object, allowing for various data types (string, number, boolean, datetime). - Parameters: - trait: An object representing the user trait, encapsulating its name and value. This object supports string, number, boolean, and datetime values for the trait. ``` -------------------------------- ### SurvicateAnswer Properties for QuestionAnsweredEvent Source: https://developers.survicate.com/mobile-sdk/unity Defines the properties of the `SurvicateAnswer` object, which is part of the `QuestionAnsweredEvent.answer`. This object provides details about the user's answer, including its type, ID(s), and text representation, with specific applicability rules for each property based on the answer type. ```APIDOC SurvicateAnswer properties (QuestionAnsweredEvent.answer): - type: string Description: Answer type. One of: ['text', 'single', 'multiple', 'smiley_scale', 'rating', 'csat', 'numerical_scale', 'nps', 'date', 'form', 'matrix', 'button_close', 'button_next', 'button_link']. - id: long? Description: Answer ID. Applicable only for types: ['single', 'smiley_scale', 'csat', 'rating', 'numerical_scale']. - ids: List Description: Selected answer IDs. Applicable only for type = ['multiple']. - value: string Description: Text representation of an answer, e.g. "Happy" for smiley scale. A `null` value in case of a skipped question. Not applicable for call-to-action answers: ['button_close', 'button_next', 'button_link']. Note: The `id`, `ids`, and `value` properties are provided only for the cases enlisted in the table above. Therefore, expect that there might be answer objects that consist only of the `type` property. ``` -------------------------------- ### Survicate Unity SDK Event Listeners Source: https://developers.survicate.com/mobile-sdk/unity Describes the event listeners available in the Survicate Unity SDK, allowing applications to react to survey-related actions. These events provide hooks for custom logic based on user interaction with surveys, such as when a survey is displayed, a question is answered, or a survey is closed/completed. ```APIDOC Event Listeners: - onSurveyDisplayed: Occurs when a survey is loaded and appears in the User Interface. - onQuestionAnswered: Occurs after a question is answered (Survicate stores incomplete survey submissions). - onSurveyClosed: Occurs when a user closes the survey using the close button. - onSurveyCompleted: Occurs when a user finishes the survey. ``` -------------------------------- ### Pass User Attributes to Survicate Source: https://developers.survicate.com/mobile-sdk/unity Allows you to provide additional information about your users to Survicate, which can be used for identification, audience filtering, response filtering, and recalling data in questions. Attributes are cached, so they only need to be set once or when their values change. ```APIDOC Survicate.SetUserAttribute(key: string, value: string | int | double | bool | DateTime) - Description: Sets a user attribute with a specified key and value. - Parameters: - key: The name of the attribute (e.g., 'user_id', 'email', 'plan_type'). Custom keys are supported. - value: The value of the attribute. Supported types include string, int, double, bool, and DateTime. - Returns: void. - Attribute Types: - string: Any text value. - int: Integer numbers. - double: Decimal numbers. - bool: Boolean values (true/false). - DateTime: A date object for time interval filters. - Special Attributes: - user_id: Marks a user as 'logged-in' in the panel. - first_name, last_name, email: Used for identifying survey participants; if none are set, responses are anonymous. - Usage Notes: Attributes are cached; set them once, typically on user login, or when their values are updated. ``` -------------------------------- ### Survicate iOS SDK User Data Reset Source: https://developers.survicate.com/mobile-sdk/ios Details the `reset()` method, which is useful for testing purposes. This method clears all user-specific data stored on the device and the current in-memory state of the SDK. ```APIDOC Survicate.reset() - Description: Clears all user data stored on the device and the current in-memory state of the SDK. - Parameters: None - Effects: Resets survey views, attributes, and information about answered surveys. ``` -------------------------------- ### Survicate Webhook Security Headers and Verification Source: https://developers.survicate.com/webhooks/security This section outlines the two primary methods Survicate uses to secure webhook events: a verification token and a recommended HMAC-SHA256 signing secret. It describes how to extract and verify these security elements to ensure the authenticity and integrity of incoming webhook requests. ```APIDOC Survicate Webhook Security Mechanisms: 1. Verification Token (less secure): - Header: `Token` - Type: String (plain text) - Purpose: Provides basic proof that the request originates from Survicate on your behalf. - Usage: Compare the value in the `Token` header with the 'Verification Token' found in your Survicate Webhooks Settings. 2. Signing Secret (recommended, HMAC-SHA256): - Header: `Hmac` - Type: String (HMAC-SHA256 signature in lowercase hexits) - Purpose: Ensures the integrity and authenticity of the webhook event using a hash-based message authentication code (HMAC) with SHA-256. - Verification Steps: a. Extract the signature string from the `Hmac` header of the incoming webhook request. b. Determine the expected signature: - Compute an HMAC using the SHA256 hash function. - Use your 'Signing Secret' (retrieved from Survicate Webhooks Settings) as the key for the HMAC computation. - Use the raw, unmodified request body of the webhook as the data to hash. - Ensure the hash function returns the hash in lowercase hexits. c. Compare the signature extracted from the `Hmac` header with the computed expected signature. If they match, the webhook event is verified as authentic and untampered. ``` -------------------------------- ### Survicate Android SDK Event Listeners and Answer Properties Source: https://developers.survicate.com/mobile-sdk/android Details on subscribing to SDK events and the structure of the `SurvicateAnswer` object. This allows applications to react to user interactions with surveys, such as survey display, question answers, and survey completion or closure. ```APIDOC Event Types: - survey_displayed: Occurs when a survey is loaded and appears in the User Interface. - question_answered: Occurs after a question is answered (Survicate stores incomplete survey submissions). - survey_closed: Occurs when a user closes the survey using the close button. - survey_completed: Occurs when a user finishes the survey. Deprecated Method: - Survicate.setEventListener: Deprecated since version 4.1.0. Use `addEventListener` and `removeEventListener` instead. SurvicateAnswer properties (QuestionAnsweredEvent.answer): - type: String - Description: Answer type. One of: ['text', 'single', 'multiple', 'smiley_scale', 'rating', 'csat', 'numerical_scale', 'nps', 'date', 'form', 'matrix', 'button_close', 'button_next', 'button_link']. - id: Long? - Description: Answer ID. Applicable only for types: ['single', 'smiley_scale', 'csat', 'rating', 'numerical_scale']. - ids: Set? - Description: Selected answer IDs. Applicable only for type = ['multiple']. - value: String? - Description: Text representation of an answer, e.g., "Happy" for smiley scale. A `null` value in case of a skipped question. Not applicable for call-to-action answers: ['button_close', 'button_next', 'button_link']. - Notes: - The `id`, `ids`, and `value` properties are provided only for the cases enlisted above. Expect that there might be answer objects that consist only of the `type` property. ``` -------------------------------- ### Survicate Webhook Events: Question Answered and Survey Answered Source: https://developers.survicate.com/webhooks/events This section describes the 'Question answered' and 'Survey answered' webhook events, including their triggers and the structure of the data payloads. The 'Question answered' event is triggered for each individual answer, while the 'Survey answered' event fires upon full survey completion. ```APIDOC Webhook Event: Question Answered Trigger: Triggered upon each respondent's answer. Each answer to every single question will be sent along with respondent data. Payload Structure: messageId: string (Webhook ID) deliveryTries: number (Number of attempts to send a webhook) questionAnswered: object type: string (Question type - described in detail in the 'question types' section) timestamp: string (Timestamp of the event occurrence) url: string (URL where the response was given) survey: object id: string (Survey ID) name: string (Survey name) respondent: object attributes: object (All respondent custom attributes) question: object body: string (Question content) id: number (Question ID) choice: object body: string (Answer content) comment: string (Respondent comment) Webhook Event: Survey Answered Trigger: Sends webhooks upon each survey completion. This event will be triggered only when the whole survey is completed. Payload Structure: (Implicitly similar to 'Question Answered' but representing the completed survey data; specific fields not detailed in this section, refer to general webhook payload structure.) ``` -------------------------------- ### SurvicateAnswer Properties (QuestionAnsweredEvent.answer) Source: https://developers.survicate.com/mobile-sdk/flutter Defines the structure and properties of the `SurvicateAnswer` object, which represents a user's response to a question within the Survicate SDK. It details various answer types and their associated data fields, including conditional applicability of properties like `id`, `ids`, and `value`. ```APIDOC SurvicateAnswer properties (QuestionAnsweredEvent.answer): type: String? Description: Answer type. One of: ['text', 'single', 'multiple', 'smiley_scale', 'rating', 'csat', 'numerical_scale', 'nps', 'date', 'form', 'matrix', 'button_close', 'button_next', 'button_link']. id: int? Description: Answer ID. Applicable only for types: ['single', 'smiley_scale', 'csat', 'rating', 'numerical_scale']. ids: List Description: Selected answer IDs. Applicable only for type = ['multiple']. value: String? Description: Text representation of an answer, e.g. "Happy" for smiley scale. A null value in case of a skipped question. Not applicable for call-to-action answers: ['button_close', 'button_next', 'button_link']. Note: The `id`, `ids` and `value` properties are provided only for the cases enlisted in the table above. Therefore, expect that there might be answer objects that consist only of the `type` property. ``` -------------------------------- ### React Native SDK Event Listeners and SurvicateAnswer Properties Source: https://developers.survicate.com/mobile-sdk/react-native The SDK allows applications to subscribe to various events triggered by user interactions with surveys. Additionally, it defines the structure of the `SurvicateAnswer` object, which provides details about a user's response to a question. ```APIDOC SDK Event Listeners: - survey_displayed: Occurs when a survey is loaded and appears in the User Interface. - question_answered: Occurs after a question is answered (Survicate stores incomplete survey submissions). - survey_closed: Occurs when a user closes the survey using the close button. - survey_completed: Occurs when a user finishes the survey. SurvicateAnswer Properties (from QuestionAnsweredEvent.answer): - type (string): Answer type. One of: ['text', 'single', 'multiple', 'smiley_scale', 'rating', 'csat', 'numerical_scale', 'nps', 'date', 'form', 'matrix', 'button_close', 'button_next', 'button_link']. - id (number | null): Answer ID. Applicable only for types: ['single', 'smiley_scale', 'csat', 'rating', 'numerical_scale']. - ids (number[] | null): Selected answer IDs. Applicable only for type = ['multiple']. - value (string | null): Text representation of an answer (e.g., "Happy" for smiley scale). Null for skipped questions. Not applicable for call-to-action answers: ['button_close', 'button_next', 'button_link']. - Note: 'id', 'ids', and 'value' properties are provided only for applicable cases; otherwise, they may be omitted or null, resulting in answer objects potentially consisting only of the 'type' property. ``` -------------------------------- ### Set Application Locale Source: https://developers.survicate.com/mobile-sdk/unity Overrides the device's default locale for the current application session. This is useful if your app allows users to change their language preference independently of system settings, influencing survey translations and device language targeting filters. ```APIDOC Survicate.SetLocale(locale: string) - Description: Sets the locale for the current application session. - Parameters: - locale: A valid IETF language tag (e.g., 'en', 'fr', 'en-US', 'pt-BR'). - Returns: void. - Usage Notes: This setting is session-specific. To persist the locale across app restarts, call `SetLocale()` again after `Survicate.Initialize()`. ``` -------------------------------- ### Managing User Attributes (Flutter SDK) Source: https://developers.survicate.com/mobile-sdk/flutter User attributes provide additional context about your users for identification, audience filtering, response filtering, and data recall in questions. Attributes are cached and only need to be set once, typically upon user login, but can be updated at any time. Custom attribute keys are supported and will appear in the Survicate panel automatically. ```APIDOC Survicate User Attribute Types: - string: Any text value. - num: An integer or decimal number. - bool: A boolean logic value (true/false). - dateTime: A dart:core `DateTime` object, used for date or time interval filters. Special Attributes: - user_id: Marks a user as 'logged-in' in the panel's Audience filter when set. - first_name: User's first name. - last_name: User's last name. - email: User's email address. - Note: If 'first_name', 'last_name', or 'email' are not specified, responses are marked as Anonymous. ``` -------------------------------- ### Target Surveys by Events Source: https://developers.survicate.com/mobile-sdk/react-native Allows triggering surveys based on custom events occurring within the application. The survey will appear instantly after the specified event is triggered. Event names and property keys are case-sensitive and must match configurations in the Survicate panel. ```APIDOC Survicate.trackEvent(eventName: string, properties?: object): void - Description: Notifies the SDK that a specific event has occurred. - Parameters: - eventName: The name of the event (case-sensitive). - properties: (Optional) An object containing additional properties related to the event. Property keys are case-sensitive. - Returns: void ``` ```JavaScript import Survicate from '@survicate/react-native'; // Track a simple event Survicate.trackEvent('ProductAddedToCart'); // Track an event with properties Survicate.trackEvent('PurchaseCompleted', { productId: 'SKU123', price: 99.99, currency: 'USD' }); ``` -------------------------------- ### Show Survey with Custom Options (showSurvey) Source: https://developers.survicate.com/javascript/methods The `showSurvey` method allows displaying a specific survey by its ID, bypassing standard targeting rules except for checking if the visitor has already answered. It returns `true` if the survey was rendered and `false` otherwise. Optional `options` can be provided to override default display behavior, including forcing display or setting specific display methods and their parameters. ```APIDOC showSurvey(surveyId: string, options?: object): boolean - Description: Displays a specific survey by its ID, ignoring most targeting options. Returns true if rendered, false otherwise. - Parameters: - surveyId: The unique identifier of the survey to display. - options: (Optional) An object to customize survey display behavior. - forceDisplay: boolean - If true, currently rendered survey will be closed in favor of the new survey. Survey will be shown regardless of whether the user has already answered this survey. - displayMethod: string - Use this option to overwrite the current displaying configuration. Possible values: ['immediately', 'delayed', 'exitIntent', 'onScroll']. - displayOptions: object - Applicable and required only for 'delayed' and 'onScroll' display methods. - delay: integer - Delay in seconds. Applicable and required only for displayMethod = 'delayed'. - scrolledPercentage: integer - Percentage of the page that was already scrolled. Applicable and required only for displayMethod = 'onScroll'. - Returns: boolean - `true` if the survey was rendered, `false` otherwise (e.g., another survey is displayed or the visitor has answered). ``` -------------------------------- ### Survicate JavaScript SDK Answer Object Properties Source: https://developers.survicate.com/javascript/events This section details the properties of the `answer` object, which is part of the event object passed to the `question_answered` event listener. These properties provide specific information about the user's response to a survey question, including the answer type, IDs, and values. ```APIDOC Answer Object Properties (for 'question_answered' event): Property | Type | Description -------------|-------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ``` -------------------------------- ### Subscribing to Survey Events (Flutter SDK) Source: https://developers.survicate.com/mobile-sdk/flutter The Survicate SDK provides event listeners that allow your application to react to various survey lifecycle events. These can be useful for triggering custom actions within your app based on user interactions with surveys. ```APIDOC Survicate Event Listeners: - onSurveyDisplayed: Occurs when a survey is loaded and becomes visible in the UI. - onQuestionAnswered: Occurs after a user answers a question within a survey (even for incomplete submissions). - onSurveyClosed: Occurs when a user explicitly closes the survey using the close button. - onSurveyCompleted: Occurs when a user finishes and submits the entire survey. ```