How can I add the Chatbot Widget to my Website?
Last updated
Last updated
The Hexabot Live Chat Widget is a React-based embeddable widget that allows you to integrate real-time chat functionality into your website. This guide will walk you through how to add the widget to your website, customize it to fit your needs, and manage its settings.
Once you have built the widget, embedding it on any webpage is straightforward. Here's how to add it:
Include the Required Scripts: First, include the React and ReactDOM libraries, as well as the Hexabot widget script.
Add the Widget Container: Create a container where the widget will be rendered.
Attach the Shadow DOM: This prevents the CSS of your website from conflicting with the chat widget's CSS by using the shadow DOM.
If you want to use the official widget and receive updates automatically, you can use the following CDN URL:
Or the latest version:
These scripts will load the Hexabot widget directly from the JsDelivr CDN, which pulls from the package published on the NPM registry.
The widget settings can be managed through the Hexabot Admin through the side menu on the left (access "Settings > Web Channel"). Below is a list of customizable settings:
Allowed Upload Mime Types: Define the types of files users can upload (e.g., audio, images, text).
Max Upload Size: Set the maximum file size for uploads (in bytes).
Enable Features: Enable or disable features like geolocation sharing, attachment uploader, and emoji picker.
Chatbot Avatar: Specify the avatar URL for the chatbot (e.g., https://eu.ui-avatars.com/api/?name=Hexa+Bot&size=64
).
Chat Window and Widget Titles: Set custom titles for the chat window and widget.
Widget Theme: Choose a color theme for the widget (e.g., teal).
Greeting Message: Customize the greeting message (e.g., "Welcome! Ready to start a conversation with our chatbot?").
Persistent Menu and Input Settings: Display a persistent menu, enable 'Get Started' button, and manage user input.
Allowed Domains: Define the domains where the widget can be embedded (e.g., http://localhost:8080
).
Verification Token: Set a token for verifying widget requests.
The Hexabot Live Chat Widget allows you to customize its appearance and behavior to match your website. You can:
Change Colors and Fonts: Match the chat widget's design to your website's branding by modifying its SCSS styles.
Configure User Settings: Customize user settings like the chatbot's language and response preferences.
To build your own widget, you can modify the styles or behavior using the widget’s source code.
As a proof of concept, we have developed a WordPress plugin that makes it easy to embed the chat widget into a WordPress website.
Adding the Hexabot Live Chat Widget to your website is straightforward and provides robust customization options for adapting it to your specific needs. By leveraging the widget’s SCSS styles, shadow DOM for isolated styling, and various settings in the Hexabot Admin UI, you can seamlessly integrate real-time chatbot functionality into your website.
If you have any questions or need assistance, feel free to reach out to the Hexabot community or consult the Hexabot documentation.