---
updatedAt: 2026-06-14T02:41:19.000Z
agentTools:
  projectIndex: https://developers.wingify.com/v2/llms.txt
---

# Survey answer submitted

## Survey Answer Submitted

### Overview

The `onSurveyAnswerSubmitted` API triggers custom functionality when a survey answer is submitted in Wingify surveys. It provides access to the data related to the submitted answers, including question details and visitor responses.

### Signature

```javascript
window.Wingify.push(['onSurveyAnswerSubmitted', function(data) {
    // Add your custom code here
}]);
```

#### Callback Data

**Type**: `Object` containing below information

| Parameter    | Data Type | Required | Description                                                                            |
| ------------ | --------- | -------- | -------------------------------------------------------------------------------------- |
| accountId    | number    | Yes      | The Wingify account ID.                                                                |
| surveyId     | number    | Yes      | The survey campaign ID of the survey being answered.                                   |
| uuid         | string    | Yes      | The unique identifier for the visitor.                                                 |
| questionId   | number    | Yes      | The unique ID of the question being answered.                                          |
| questionType | string    | Yes      | The type of the question (e.g., "multi\_line", "checkbox", "radio").                   |
| questionText | string    | Yes      | The text of the question being answered.                                               |
| answers      | array     | Yes      | An array of answer objects containing id (number) and value (string).                  |
| skipped      | boolean   | No       | Indicates whether the visitor skipped the question. If true, the question was skipped. |

### Example

```javascript
window.Wingify = window.Wingify || [];
window.Wingify.push(['onSurveyAnswerSubmitted', function(data) {
    // Custom functionality for survey answer submission
    console.log("Survey answer submitted:", data);
}]);
```

#### Sample Data Object

**Text Response (multi-line):**

```javascript
{
    "accountId": 307590,
    "surveyId": 293,
    "uuid": "D37EF4336FD3C784165C6D2BEBDACE430",
    "questionId": 2005,
    "questionType": "multi_line",
    "questionText": "What could we do to make this site more useful?",
    "answers": [
        {
            "id": 1,
            "value": "Add multiple theme options"
        }
    ]
}
```

### Use-cases

* **Customer Data Integration**: Use this callback to tag survey answers with visitor data and send it to your Customer Data Platform (CDP) or data warehouse for deeper analysis.
* **Behavior Analysis**: Push survey response data to analytics tools like Google Analytics to track visitor behavior, such as response patterns and survey interactions.
* **CRM Integration**: For sales teams, integrate survey responses into your CRM system to refine strategies based on customer feedback, such as identifying competitors being evaluated.