> This page is for version Generative (default).
> For other versions, use one of these documentation indexes:
> - Generative (default): https://developers.ada.cx/generative/llms.txt
> - Scripted: https://developers.ada.cx/scripted/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.ada.cx/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.ada.cx/_mcp/server.

# New chat window events in Embed2

We've added new events to the [`subscribeEvent`](/reference/embed2-reference#subscribeevent) action in Embed2 to help you better track user interactions within the chat window:

| Event key           | Trigger                                         | Payload                                            |
| :------------------ | :---------------------------------------------- | :------------------------------------------------- |
| `ada:minimize_chat` | Triggered when a user minimizes the chat window | `{ conversation_id: string, is_engaged: boolean }` |
| `ada:close_chat`    | Triggered when a user closes the chat window    | `{ conversation_id: string, is_engaged: boolean }` |

If you're using the Embed2 script, these events are immediately available. For the [NPM package](https://www.npmjs.com/package/@ada-support/embed2), update to the latest version (1.9.0) to start using them.