C
Chatty

Embed the Widget

Add your bot to any website with a single <script> tag — no framework required.

Get your embed code

  1. Open the Chatty dashboard
  2. Select your bot in the sidebar
  3. Go to Embed & Integrate — pick your platform there for a ready-to-paste snippet and step-by-step instructions
  4. Copy the snippet
Paste just before </body>
<script
  src="https://chatty.personaliai.com/widget.js"
  data-id="YOUR_BOT_ID"
  defer
></script>

That's it. A floating launcher button appears in the bottom-right corner of every page, and opens the assistant in an embedded chat panel.

The script tag must use data-id, not data-bot-id — the widget loader looks for data-id specifically and won't work if that attribute is named anything else.

Find YOUR_BOT_ID in the Embed & Integrate tab of your dashboard.

Configuration attributes

All of these are optional — when omitted, the widget uses whatever you've configured in the dashboard's Customizer tab, and updates automatically if you change it there later (no need to re-embed).

AttributeDefaultDescription
data-idRequired. Your bot's unique ID.
data-colorBot's saved colorOverride the launcher button color (hex, e.g. #6366f1). Only affects the button itself, not the chat panel's theme.
data-styleBot's saved styleOverride the widget's visual style preset.
data-position"right"Which corner the launcher sits in: right or left.
data-mobile-fullscreen"true"Set to "false" to keep the desktop floating-panel layout on mobile instead of going fullscreen.
data-teaser"true"Set to "false" to disable the proactive greeting bubble that appears after a few seconds.
data-sound"true"Set to "false" to disable the notification chime on new replies.
Full example with options
<script
  src="https://chatty.personaliai.com/widget.js"
  data-id="a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  data-position="left"
  data-color="#6366f1"
  data-mobile-fullscreen="false"
  data-teaser="false"
  data-sound="false"
  defer
></script>

JavaScript API

Once the widget has loaded, control it programmatically via window.Chatty:

window.Chatty.open()    // open the chat panel
window.Chatty.close()   // close it
window.Chatty.toggle()  // toggle open/closed

This is the full API surface today — there's no window.Chatty.on(...) event system yet. If you need to react to messages or leads programmatically (e.g. push them into your own analytics), use webhooks instead, which push those events to your backend server-side.

Platform guides

What's next