> ## Documentation Index
> Fetch the complete documentation index at: https://docs.upstackdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# quiz_question_answered Event

> Track when a visitor answers a quiz question

Fires when a visitor answers a quiz question.

## Example

```javascript theme={null}
window._upstack('track', 'quiz_question_answered', {
  // User data
  email: 'jane@example.com',

  // Custom data
  quiz_id: 'tee-fit-finder',
  question_id: 'q3',
  question_number: 3,
  question_text: 'How do you like your tees to fit?',
  answer_id: 'a2',
  answer_text: 'Relaxed',
  total_questions: 8,
  time_on_question: 12
});
```

> [!NOTE]
>
> This is a custom event, so every key is custom data. Upstack fires it for you on Octane AI quizzes. For any other quiz, fire it yourself.

## Standard parameters

This event has no standard parameters.

## User data

| Name | Type | Required | Example value | Description |
| - | - | - | - | - |
| [`email`](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/email) | `string` | Yes\* | `jane@example.com` | Email address. |
| [`phone`](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/phone) | `string` | Yes\* | `+15551234567` | Phone number in E.164 format. |
| [`firstName`](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/name) | `string` | No | `Jane` | First name. |
| [`lastName`](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/name) | `string` | No | `Smith` | Last name. |

\* Required once you know it.

## Custom data

Examples for this event. See [how custom data works](https://docs.upstackdata.com/event-tracking/event-taxonomy/properties/custom-data.md).

| Name | Type | Example value | Description |
| - | - | - | - |
| `quiz_id` | `string` | `tee-fit-finder` | Your ID for the quiz. Send the same value on both quiz events. |
| `question_id` | `string` | `q3` | Your ID for the question. |
| `question_number` | `number` | `3` | The position of the question. |
| `question_text` | `string` | `How do you like your tees to fit?` | The question as shown. |
| `answer_id` | `string` | `a2` | Your ID for the answer. |
| `answer_text` | `string` | `Relaxed` | The answer as shown. |
| `total_questions` | `number` | `8` | How many questions the quiz has. |
| `time_on_question` | `number` | `12` | Seconds spent on the question. |

## Related events

* [`quiz_completed`](https://docs.upstackdata.com/event-tracking/event-taxonomy/quiz-events/quiz-completed) — A visitor finishes a quiz.
* [`lead`](https://docs.upstackdata.com/event-tracking/event-taxonomy/standard-events/lead) — A visitor submits a lead form.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.