Frontend Integration

Website Embed SDK

Add a chat bubble with one script tag, or embed chat and voice windows with an iframe. Style it in the dashboard.

Browse docs Website Embed SDK

Chat bubble

Paste the script before your closing body tag. It adds a floating button that opens the chat window.

<script
  src="https://widget.embage.com/widget.js"
  data-agent-key="YOUR_AGENT_KEY"
  data-position="bottom-right"
  data-color="#8a53e8"
  data-color-text="#ffffff"
  defer
></script>
  • data-agent-key: your agent's public key (required)
  • data-position: bottom-right, bottom-left, top-right or top-left
  • data-color and data-color-text: the button's background and icon colour

Inline chat or voice

Embed the chat window, or the voice window, anywhere on a page with an iframe. Voice needs allow="microphone".

<iframe
  src="https://widget.embage.com/chat-window?pubAgentKey=YOUR_AGENT_KEY"
  title="Chat agent"
  style="width: 100%; height: 600px; border: 0;"
></iframe>

Swap chat-window for voice-window to embed voice. The same addresses work as share links you can send by email or post anywhere.

Styling

Set separate light and dark colours for the background, header, text and message bubbles, plus font, text size and corner radius, in the agent's widget settings. The widget follows the visitor's light or dark setting; add &theme=light or &theme=dark to the address to force one. Changes apply on the next load, with no code to update.

Allowed websites

List the domains the agent may run on, including wildcard subdomains. Browsers then refuse to load the widget anywhere else, conversations from other sites are rejected, and the share links stop working.

Need help implementing? Check our FAQ Hub Start building
Free plan · paid plans free for 7 days

Build your first customer agent.

No credit card. Questions? Write to support@embage.com.