-
Notifications
You must be signed in to change notification settings - Fork 18
π Integrating Chatbot into Your Website
Enhance your website's interactivity and user engagement by seamlessly integrating our chatbot. Follow the simple steps below to implement the chatbot into your website:
Identify the HTML file where you wish to add the chatbot. This will typically be in the root directory of your website or within a specific subdirectory if you aim to integrate the chatbot on a particular page.
Below is the chatbot integration code snippet. This piece of code is designed to be lightweight and compatible with most web environments, ensuring a smooth integration process.
<script
src="https://assistant.ai.boldare.dev/assets/js/ai-embedded.js"
data-chat-initial="true"
defer
></script>
We highly recommend inserting the code snippet just before the closing body tag of your HTML file. This placement ensures that the chatbot will load only after all other content on your page has fully loaded, optimizing your page's load time for a better user experience.
For a tailored interaction experience, you may prefer to manually initialize the chatbot rather than opting for automatic activation. This approach gives you greater control over the chatbot's initialization timing and its configuration, ensuring the chatbot seamlessly integrates with the flow of your website.
To prevent the chatbot from automatically initializing, locate and remove the following attribute from the chatbot integration code snippet:
data-chat-initial="true"
For manual chatbot initialization, incorporate the following JavaScript code snippet into your website's JavaScript file. This script lets you dictate exactly when and how the chatbot becomes active on your site, offering the opportunity to customize its configuration further.
new AssistantIframe({
url: `https://assistant.ai.boldare.dev/chat/iframe`
}).init();