Embed the chat widget
Add the AI Toruk widget to any website with a single script tag. The widget loads configuration from the console using your chatbot public key.
Install the snippet
From your chatbot settings, copy the embed code and paste it before </body> on every page where the chat should appear:
<script src="https://console.aitoruk.com/widget.js"
data-chatbot="YOUR_PUBLIC_KEY"
data-api-base="https://console.aitoruk.com"
defer></script>
Replace the script host with your console URL if you use a custom deployment. Include data-api-base when the widget is embedded on a different domain than the console so chat requests reach your API.
Conversation history is stored in the visitor's browser (localStorage) and continues across pages on the same site using the same public key.
Domain security
Set the chatbot website URL to the domain where the widget is installed. When domain checking is enabled, chat API requests must originate from that host (via Origin or Referer header) to prevent unauthorized use of your public key.
Customization
Widget colors, position, launcher text, and welcome message are controlled from chatbot settings. Plan features may require an upgrade to remove "Powered by" branding or enable lead capture in the widget.
WordPress, WooCommerce & Shopify
Add the snippet via a custom HTML block, theme footer, or a header/footer plugin. For store-aware chat (product search and order lookup), open Chatbots → [your bot] → Edit settings → Store tools and connect WooCommerce or Shopify. Each chatbot can have its own store connection and tool set.
Troubleshooting
- Widget not appearing — Confirm the script is on the page, the bot is active, and no ad blocker is blocking the script.
- Chat errors — Verify the website URL matches the embedding domain and your trial or subscription is active.
- Store tools not working — Confirm you connected the store on the same chatbot whose
data-chatbotkey is embedded, and that tools are enabled under Store tools. - Wrong product links — Set the chatbot Website URL to your live storefront domain.
- Stale content — Republish after knowledge changes; use Clear chat in the widget to reset a session after config changes.