Skip to main content
The embed dispatches CustomEvents on window so you can react to lifecycle and interaction without polling. Each event carries { chatbotId } in event.detail. For almost all integrations, these events plus the methods are all you need.

Browser events

homiebot:opened and homiebot:closed fire for every open/close action — the launcher button, welcome bubbles, window.homieBot.open() / .close() / .toggle(), and actions triggered from inside the chat.

Listen for the API

Fired once window.homieBot is usable.

Listen for the assistant

Fired once the iframe is ready for sendMessage and getHistory.

Track open and close

Useful for forwarding interactions to analytics.