Esta página aún no está traducida al español — mostrando la versión en inglés.

Web widget

Paste a single script tag on your site to show a floating chat bubble, or share a direct chat link.

The web widget is the default channel for every chatbot. The Web Widget tab on the Channels page gives you two copy-paste outputs: an embed script for your site, and a shareable direct-chat URL.

The page

Heading: Web Widget Subheading: "Drop one script onto any page and your chatbot appears as a floating chat bubble. Share a direct link for anyone to chat without visiting your site."

A Customize widget button (top right) takes you to the widget settings form. Then two rows — each with a Copy button, and the shareable link also has an Open ↗ to jump into the live preview.

1. The embed script

Row label: "Embed script" Hint: "Paste before on every page where you want the widget to appear."

The snippet looks exactly like this:

(The URL's host matches the ChatbotGen deployment — in dev it's http://localhost:4000, in production it's https://www.chatbotgen.com.)

Paste it anywhere in your HTML, typically just before so it doesn't block first paint. No defer is needed.

Row label: "Shareable link" Hint: "Send this URL to anyone — they can chat with your bot in full-page mode."

The URL pattern:

https://www.chatbotgen.com/v2/chatbots/YOUR-SLUG/widget

Paste it into an email, a QR code, or a social post. Anyone clicking gets the full-page chat UI — no widget installation needed on their end.

What the loader script does

The script.js file is served by ChatbotGen with:

  • Content-Type: application/javascript
  • Access-Control-Allow-Origin: * — works from any domain
  • Cache-Control: public, max-age=10800 — cached for 3 hours

On load it:

  1. Appends a