Skip to content
Documentation
Docs/EMBED

Mount, Update, and Unmount Chatbot Widget

Mount, update, and unmount the widget safely on your site.

1) Place the container

html
<div id="cv-chat"></div>

2) Load the latest CDN files once

html
<link rel="stylesheet" href="https://cdn.cortexvia.in/chatbotsdk-web.css" />
<script src="https://cdn.cortexvia.in/chatbotsdk-web.iife.js"></script>

3) Start the widget

html
<script>
window.cvChatHandle = window.ChatbotSDK.mount("#cv-chat", {
chatbotKey: "ctx-cb-xxxxxxxxxxxxxxxx",
config: {
mode: "chatbot"
}
});
</script>

4) Change settings later

html
<script>
if (window.cvChatHandle) {
window.cvChatHandle.update({
chatbotKey: "ctx-cb-xxxxxxxxxxxxxxxx",
config: {
mode: "chat",
inputPlaceholder: "Ask anything..."
}
});
}
</script>

5) Remove widget

html
<script>
if (window.cvChatHandle) {
window.cvChatHandle.unmount();
window.cvChatHandle = null;
}
</script>

Continue