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

# New chat window events in Embed2

New events have been added to the [`subscribeEvent`](/chat/web/sdk-api-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.