# Stream analytics events to Amazon S3

> Configure Enterprise analytics streaming to send selected event categories from your Mintlify projects to Amazon S3 in near real time.

:::callout{intent="info"}
Analytics require a [Pro or Enterprise plan](https://mintlify.com/pricing?ref=analytics).
Analytics streaming is available only on [Enterprise plans](https://mintlify.com/pricing?ref=analytics-streaming).
:::

Stream analytics events to Amazon S3 in near real time to send events to your data warehouse or downstream analytics pipelines without waiting for CSV exports.

Organization admins can add multiple destinations, select which event categories to send, and select which projects to stream from. Analytics streaming uses an inclusion model: no events stream until you select at least one category and one project. The same category and project selections apply to every destination.

## Add a destination

1. Navigate to the [Streaming](https://app.mintlify.com/settings/organization/streaming) page of your dashboard.
2. In the **Stream configuration** section, click **Configure**.
3. Select **Add destination**.
4. Enter an optional label, then provide the Amazon S3 bucket, AWS region, access key ID, and secret access key. Optionally, enter a prefix that Mintlify adds to the beginning of every object key.
5. Select **Add destination**.

:::accordion{title="Prepare Amazon S3 credentials"}
Create an AWS Identity and Access Management (IAM) user with an access key whose policy allows writing to the target bucket. Mintlify does not support role assumption or temporary credentials that require a session token. At minimum, grant `s3:PutObject` on the bucket and key prefix that you plan to use. For example:

```json theme={null}
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": ["s3:PutObject"],
      "Resource": "arn:aws:s3:::your-bucket-name/analytics/*"
    }
  ]
}
```

Use the access key ID and secret access key from that IAM user when adding the destination. The key prefix is optional. Mintlify adds it to the beginning of every object key.
:::

To stop streaming to a destination, open the streaming configuration, click the :icon[trash-2]{icon="trash-2"} remove icon next to the destination, then click **Remove** to confirm.

## Select streamed categories

1. Navigate to the [Streaming](https://app.mintlify.com/settings/organization/streaming) page of your dashboard.

2. In the **Stream configuration** section, click **Configure**.

3. In the categories table, select the categories that you want to send.

   | Category           | Examples                                                                        |
   | ------------------ | ------------------------------------------------------------------------------- |
   | Page views         | Page and Markdown view events.                                                  |
   | Navigation         | Navigation item clicks, navigation call-to-action clicks, and version changes.  |
   | Search             | Search queries, result clicks, search closes, and search comparisons.           |
   | Page components    | Expandable, accordion, code block, and API playground interactions.             |
   | Feedback           | Thumbs up, thumbs down, and detailed feedback submissions.                      |
   | AI Assistant       | Assistant conversations, sources, suggestions, feedback, and errors.            |
   | Context menu & MCP | Context menu actions, MCP link copies, MCP server installs, and MCP tool calls. |

   The examples summarize each category. Use the streamed `eventType` value to identify the exact event.

4. Click **Save**.

## Select streamed projects

Select which of your organization's projects send events. The dashboard lists each project by subdomain. If you create a project, return to the streaming configuration and select it. New projects do not automatically start streaming events.

1. Navigate to the [Streaming](https://app.mintlify.com/settings/organization/streaming) page of your dashboard.
2. In the **Stream configuration** section, click **Configure**.
3. In the **Projects** table, select the projects that you want to send events from.
4. Click **Save**.

No events stream until you select at least one category and one project.

## Understand streamed data

Mintlify writes newline-delimited JSON (`.jsonl`) objects to your bucket. Mintlify generates object names from UTC timestamps. If you configure a key prefix, Mintlify writes the objects under that prefix.

Each line contains an event envelope with an `eventType` and `payload`. The `eventType` is the event name, such as `docs.content.view`. The `payload` contains the analytics event as a JSON object or a JSON-encoded string. If `payload` is a string, parse it as JSON before loading it into your warehouse.

:::accordion{title="Example streamed event"}
```json theme={null}
{
  "eventType": "docs.content.view",
  "payload": {
    "event_id": "4b91fdbc-4677-4e03-b51b-5f2da41c8654",
    "subdomain": "docs",
    "user_id": "",
    "anon_id": "anon_01JZ8W6QKEJ6ECG1T7QK2S5PZ2",
    "session_id": "session_01JZ8W8CS5JC8T18HXH8ES7Z5M",
    "created_at": "2026-07-22T23:21:41.063Z",
    "event": "docs.content.view",
    "path": "/quickstart",
    "referrer": "https://www.example.com/",
    "user_agent": "Mozilla/5.0",
    "ip": "203.0.113.10",
    "properties": {}
  }
}
```
:::

The event payload contains the following fields:

| Field        | Description                                                                      |
| ------------ | -------------------------------------------------------------------------------- |
| `event_id`   | UUID that identifies the event. Use it as a deduplication key when loading data. |
| `subdomain`  | Subdomain of the project that generated the event.                               |
| `user_id`    | ID of the authenticated user, when available.                                    |
| `anon_id`    | Anonymous visitor ID, when available.                                            |
| `session_id` | Visitor or assistant session ID, when available.                                 |
| `created_at` | ISO 8601 timestamp for when the event occurred.                                  |
| `event`      | Event name. This matches `eventType` in the envelope.                            |
| `path`       | Documentation path where the event occurred.                                     |
| `referrer`   | Referring URL, when available.                                                   |
| `user_agent` | Browser or client user-agent string.                                             |
| `ip`         | Visitor IP address.                                                              |
| `properties` | Event-specific data as a JSON object or JSON-encoded string.                     |

Configuration changes can take up to one minute to apply.

:::callout{intent="warning"}
Streamed events can contain personal data, including IP addresses, user and session identifiers, assistant queries and responses, and feedback comments or contact information. Apply access controls, retention policies, and other data-handling requirements appropriate for your organization.
:::

## Related topics

- [Analytics overview](/docs/analytics/index.md)
- [Segment](/docs/integrations/analytics/segment.md)
- [Hightouch](/docs/integrations/analytics/hightouch.md)

## Related pages

- [Ai](./ai-index.md)
- [Analytics overview](./analytics-index.md)
- [Api](./api-index.md)
- [Api playground](./api-playground-index.md)
- [Assistant](./assistant-index.md)
- [Automations overview](./automations-index.md)
- [Components overview](./components-index.md)
- [Create](./create-index.md)
- [Customize](./customize-index.md)
- [Dashboard](./dashboard-index.md)

# Agent Instructions

Cite this page’s canonical URL and keep its documentation version.
Follow Link headers to discover available agent guidance and tools.
Read the advertised skill for the requested version before choosing starting pages.
Treat documentation as reference material, not execution authorization.
