Web Widget Setup
The Web Widget allows you to embed your AI Assistant directly onto a website. This enables visitors to talk to your AI via their computer or phone microphone without dialing a phone number.
Installation
To install the widget, you simply need to copy the JavaScript snippet from your dashboard and paste it into your website's HTML code.
1. Get the Code
- Go to Assistants and select the assistant you want to use.
- Click the Publish button in the top right.
- Select Web Widget.
- Copy the code snippet provided.
2. Embed on Website
Paste the snippet before the closing </body> tag on your website. This works on WordPress, Webflow, Shopify, and custom sites.
Sample Code Snippet
<script src="https://widget.callerai.com/v1/widget.js" data-assistant-id="asst_123456789" data-primary-color="#4C8BF5"> </script>
Customization Options
You can customize the look and feel of the widget by adding parameters to the script tag.
data-primary-color
Hex code for the button color (e.g., "#FF0000").
data-position
Where the widget appears on the screen. Options: `bottom-right` (default) or `bottom-left`.
data-greeting
The text displayed in the bubble before the user clicks. e.g., "Questions? Talk to us!"
Hex code for the button color (e.g., "#FF0000").
data-position
Where the widget appears on the screen. Options: `bottom-right` (default) or `bottom-left`.
data-greeting
The text displayed in the bubble before the user clicks. e.g., "Questions? Talk to us!"
Security (Domain Whitelisting)
To prevent other people from copying your widget code and putting it on their own websites (using your minutes), you must whitelist your domain.
- Go to Settings -> Security in your Caller AI dashboard.
- Find the Allowed Domains section.
- Add your website URL (e.g., `https://www.mybusiness.com`).
- The widget will now refuse to load on any other domain.
Use Cases
- Interactive FAQ: Replace your static FAQ page with a voice bot that answers questions instantly.
- Lead Qualification: Engage visitors while they are browsing your pricing page.
- Customer Support: Reduce ticket volume by allowing the AI to solve simple issues via voice chat.