Chat Widget — Embed Your Bot on Any Website
Chat Widget — Embed Your Bot on Any Website
The Botaura chat widget is a small button that appears on your website. When visitors click it, a chat window opens and they can talk to your AI assistant instantly. This guide covers embedding, customization, and troubleshooting.
Embedding the Widget
Go to Dashboard → Embed to get your embed code.
The Code
<script
src="https://botaura.app/widget.js"
data-business-id="YOUR_BUSINESS_ID"
></script>
Copy this code and paste it into your website's HTML, just before the closing </body> tag.
The widget will appear as a floating button in the bottom-right corner.
Platform-Specific Setup
Plain HTML / Custom Website
- Open your website's HTML file
- Find the
</body>tag at the bottom - Paste the widget code just above it
- Save and upload
WordPress
- Go to Appearance → Theme Editor
- Select footer.php from the right sidebar
- Paste the widget code just before
</body> - Click Update File
Alternatively, use a plugin like "Insert Headers and Footers" to add the code without editing theme files.
Shopify
- Go to Online Store → Themes
- Click Actions → Edit Code
- Open theme.liquid
- Paste the widget code just before
</body> - Click Save
Customizing Appearance (Pro+)
Go to Dashboard → Bot Setup to customize every aspect of your widget:
Widget Button
- Position — left or right side of the screen
- Size — small (48px), standard (60px), or large (72px)
- Shape — circle, rounded, or square
- Custom icon — upload your own button image
- Bottom offset — adjust distance from the bottom edge
Chat Window
- Bot name — displayed in the chat header
- Avatar — your bot's profile picture
- Welcome message — the first message visitors see when they open the chat
- Header text and tagline — shown at the top of the chat window
- Brand color — affects the header and user message bubbles
- Tone — professional, friendly, or casual (affects how the AI writes)
Message Bubbles
- Bot bubble — background color and text color
- User bubble — background color and text color
- Border radius — small, medium, large, or full rounded corners
Domain Whitelist
For security, you can restrict which domains can load your widget. In Dashboard → Embed,
add your allowed domains (e.g., mystore.com).
- Exact match and subdomain match are supported — adding
mystore.comalso allowsshop.mystore.com - Leave the list empty to allow the widget on any domain
- Local development domains (e.g.,
localhost) don't need to be whitelisted
How Sessions Work
Each visitor gets a unique session. The conversation history persists as long as the browser tab is open (stored in sessionStorage). If the visitor closes and reopens the tab, a new session starts.
The widget authenticates using a JWT token (generated automatically). The token expires after 1 hour and is refreshed seamlessly — visitors never notice.
What Visitors Experience
- A chat button appears on your website (customizable position and style)
- Clicking it opens the chat window with your welcome message
- The visitor types a question
- The bot streams a response in real-time (word by word)
- If products are relevant, product cards appear with images, prices, and links (Pro+)
- If the visitor shows buying intent, the bot gently asks for contact info (lead capture)
Product Cards (Pro+)
When a customer asks about products, the bot can show interactive product cards with:
- Product image
- Title and price
- Short description
- Link to the product page
Product cards are automatically generated from your product catalog. Make sure your products are added in Dashboard → Products (or imported via website crawl).
Widget Errors
If the widget encounters a JavaScript error on a visitor's browser, it's automatically logged. You can view these errors in Dashboard → Widget Errors — helpful for debugging compatibility issues across different browsers and devices.
Remove Branding (Pro+)
On the Free plan, the widget shows a small "Powered by Botaura" badge. On Pro and above, this is removed for a fully white-label experience.
Was this helpful?
Related Articles
Knowledge Base — Train Your Bot
Your bot's intelligence comes entirely from your knowledge base. The more relevant content you add, the better it answers customer questions. This guide covers all three ways to train your bot and
~4 min read
Lead Capture — Turn Visitors into Contacts
Botaura automatically identifies when a visitor is interested in your products or services and gently collects their contact information. No forms, no popups — just a natural conversation.
~3 min read
WhatsApp Orders — Sell Directly in Chat
With Botaura's WhatsApp Commerce feature, your customers can browse your product catalog, build a cart, and place orders — all within a WhatsApp conversation. Cash-on-delivery built in, with autom
~3 min read