# Survey Events

Events related to survey interactions.

## Survey Viewed

- Event Name: `survey-viewed`
- Track when a user views a survey for the first time.
- This event is raised when the survey interface is loaded and displayed to the user.

| Field | Type | Description | Required |
| --- | --- | --- | --- |
| timestamp | String (TimeStamp) | The timestamp of the event | Yes |
| pageTitle | String | The title of the page where the event occurred | Yes |
| hostName | String | The hostname of the page where the event occurred | Yes |
| pathName | String | The path of the page where the event occurred | Yes |
| queryString | String | The query string of the page where the event occurred | Yes |
| url | String | The URL of the page where the event occurred | Yes |
| referrer | String | The URL that linked to the page where the event occurred | Yes |
| languages | Array | The languages of the browser that made the request | Yes |
| userAgent | String | The user agent of the browser that made the request | Yes |
| siteId | String (GUID) | The ID of the hub where the event occurred | Yes |
| siteName | String | The name of the hub where the event occurred | Yes |
| userId | String (GUID) | The ID of the user that performed the action | Yes |
| contactId | String (GUID) | The ID of the contact that performed the action | Yes |
| surveyId | String (GUID) | The ID of the survey that was viewed | Yes |
| surveyName | String | The name of the survey that was viewed | Yes |
| recipientId | String (GUID) | The ID of the recipient that viewed the survey | Yes |

## Survey Submitted

- Event Name: `survey-submitted`
- Track when a user completes and submits a survey.
- This event is raised after all validation passes and the survey data is successfully submitted.

| Field | Type | Description | Required |
| --- | --- | --- | --- |
| timestamp | String (TimeStamp) | The timestamp of the event | Yes |
| pageTitle | String | The title of the page where the event occurred | Yes |
| hostName | String | The hostname of the page where the event occurred | Yes |
| pathName | String | The path of the page where the event occurred | Yes |
| queryString | String | The query string of the page where the event occurred | Yes |
| url | String | The URL of the page where the event occurred | Yes |
| referrer | String | The URL that linked to the page where the event occurred | Yes |
| languages | Array | The languages of the browser that made the request | Yes |
| userAgent | String | The user agent of the browser that made the request | Yes |
| siteId | String (GUID) | The ID of the hub where the event occurred | Yes |
| siteName | String | The name of the hub where the event occurred | Yes |
| userId | String (GUID) | The ID of the user that performed the action | Yes |
| contactId | String (GUID) | The ID of the contact that performed the action | Yes |
| surveyId | String (GUID) | The ID of the survey that was submitted | Yes |
| surveyName | String | The name of the survey that was submitted | Yes |
| recipientId | String (GUID) | The ID of the recipient that submitted the survey | Yes |

## Survey Screen Viewed

- Event Name: `survey-screen-viewed`
- Track when a user views a specific screen within a multi-screen survey.
- This event is raised each time a new screen becomes visible to the user.

| Field | Type | Description | Required |
| --- | --- | --- | --- |
| timestamp | String (TimeStamp) | The timestamp of the event | Yes |
| pageTitle | String | The title of the page where the event occurred | Yes |
| hostName | String | The hostname of the page where the event occurred | Yes |
| pathName | String | The path of the page where the event occurred | Yes |
| queryString | String | The query string of the page where the event occurred | Yes |
| url | String | The URL of the page where the event occurred | Yes |
| referrer | String | The URL that linked to the page where the event occurred | Yes |
| languages | Array | The languages of the browser that made the request | Yes |
| userAgent | String | The user agent of the browser that made the request | Yes |
| siteId | String (GUID) | The ID of the hub where the event occurred | Yes |
| siteName | String | The name of the hub where the event occurred | Yes |
| userId | String (GUID) | The ID of the user that performed the action | Yes |
| contactId | String (GUID) | The ID of the contact that performed the action | Yes |
| surveyId | String (GUID) | The ID of the survey that was viewed | Yes |
| surveyName | String | The name of the survey that was viewed | Yes |
| recipientId | String (GUID) | The ID of the recipient that viewed the survey screen | Yes |
| screenId | String (GUID) | The ID of the screen that was viewed | Yes |
| screenName | String | The name of the screen that was viewed | Yes |
| screenNumber | Number | The number of the screen that was viewed | Yes |

## Survey Screen Started

- Event Name: `survey-screen-started`
- Track when users start entering data on individual survey screens.
- This event is raised when the user first interacts with form elements on a screen.

| Field | Type | Description | Required |
| --- | --- | --- | --- |
| timestamp | String (TimeStamp) | The timestamp of the event | Yes |
| pageTitle | String | The title of the page where the event occurred | Yes |
| hostName | String | The hostname of the page where the event occurred | Yes |
| pathName | String | The path of the page where the event occurred | Yes |
| queryString | String | The query string of the page where the event occurred | Yes |
| url | String | The URL of the page where the event occurred | Yes |
| referrer | String | The URL that linked to the page where the event occurred | Yes |
| languages | Array | The languages of the browser that made the request | Yes |
| userAgent | String | The user agent of the browser that made the request | Yes |
| siteId | String (GUID) | The ID of the hub where the event occurred | Yes |
| siteName | String | The name of the hub where the event occurred | Yes |
| userId | String (GUID) | The ID of the user that performed the action | Yes |
| contactId | String (GUID) | The ID of the contact that performed the action | Yes |
| surveyId | String (GUID) | The ID of the survey that was started | Yes |
| surveyName | String | The name of the survey that was started | Yes |
| recipientId | String (GUID) | The ID of the recipient that started the survey screen | Yes |
| screenId | String (GUID) | The ID of the screen that was started | Yes |
| screenName | String | The name of the screen that was started | Yes |
| screenNumber | Number | The number of the screen that was started | Yes |

## Survey Screen Finished

- Event Name: `survey-screen-finished`
- Track when a user completes all required fields on a survey screen.
- This event is raised when all mandatory fields on a screen are filled and validated and the user proceeds to the next screen (or submission).

| Field | Type | Description | Required |
| --- | --- | --- | --- |
| timestamp | String (TimeStamp) | The timestamp of the event | Yes |
| pageTitle | String | The title of the page where the event occurred | Yes |
| hostName | String | The hostname of the page where the event occurred | Yes |
| pathName | String | The path of the page where the event occurred | Yes |
| queryString | String | The query string of the page where the event occurred | Yes |
| url | String | The URL of the page where the event occurred | Yes |
| referrer | String | The URL that linked to the page where the event occurred | Yes |
| languages | Array | The languages of the browser that made the request | Yes |
| userAgent | String | The user agent of the browser that made the request | Yes |
| siteId | String (GUID) | The ID of the hub where the event occurred | Yes |
| siteName | String | The name of the hub where the event occurred | Yes |
| userId | String (GUID) | The ID of the user that performed the action | Yes |
| contactId | String (GUID) | The ID of the contact that performed the action | Yes |
| surveyId | String (GUID) | The ID of the survey that was finished | Yes |
| surveyName | String | The name of the survey that was finished | Yes |
| recipientId | String (GUID) | The ID of the recipient that finished the survey screen | Yes |
| screenId | String (GUID) | The ID of the screen that was finished | Yes |
| screenName | String | The name of the screen that was finished | Yes |
| screenNumber | Number | The number of the screen that was finished | Yes |

## Survey Form Field Touched

- Event Name: `survey-form-field-touched`
- Track when a user first interacts with a form field within a survey.
- This event is raised on the first focus, click, or input action on a form field.

| Field | Type | Description | Required |
| --- | --- | --- | --- |
| timestamp | String (TimeStamp) | The timestamp of the event | Yes |
| pageTitle | String | The title of the page where the event occurred | Yes |
| hostName | String | The hostname of the page where the event occurred | Yes |
| pathName | String | The path of the page where the event occurred | Yes |
| queryString | String | The query string of the page where the event occurred | Yes |
| url | String | The URL of the page where the event occurred | Yes |
| referrer | String | The URL that linked to the page where the event occurred | Yes |
| languages | Array | The languages of the browser that made the request | Yes |
| userAgent | String | The user agent of the browser that made the request | Yes |
| siteId | String (GUID) | The ID of the hub where the event occurred | Yes |
| siteName | String | The name of the hub where the event occurred | Yes |
| userId | String (GUID) | The ID of the user that performed the action | Yes |
| contactId | String (GUID) | The ID of the contact that performed the action | Yes |
| surveyId | String (GUID) | The ID of the survey that the form field is on | Yes |
| surveyName | String | The name of the survey that the form field is on | Yes |
| recipientId | String (GUID) | The ID of the survey recipient that touched the form field | Yes |
| screenId | String (GUID) | The ID of the screen that the form field is on | Yes |
| screenName | String | The name of the screen that the form field is on | Yes |
| screenNumber | Number | The number of the screen that the form field is on | Yes |
| formFieldId | String (GUID) | The ID of the form field that was touched | Yes |
| formFieldName | String | The name of the form field that was touched | Yes |
