Docs/EMBED
Embed Troubleshooting for AI Chatbot Websites
Fix CDN, mount, config, mode, and styling issues.
Common Issues and Fixes
| Issue | Likely Cause | Action |
|---|---|---|
window.ChatbotSDK is not available | Widget script did not load | Confirm chatbotsdk-web.iife.js loads successfully, then run mount() after that script tag. |
| Widget renders unstyled | Stylesheet is missing or blocked | Confirm chatbotsdk-web.css is loaded on the page and not blocked by browser or site settings. |
| Widget does not start after adding a key | Missing or empty chatbotKey | Use a valid non-empty key copied from My Chatbots. |
| Widget stops after adding custom options | A display option was placed outside config | Keep chatbotKey for your bot, then place mode, title, showPoweredBy, and styleOverrides inside config. |
| Widget still shows previous behavior after an update | The page is loading an older copied file | Confirm both chatbotsdk-web.css and chatbotsdk-web.iife.js load directly from https://cdn.cortexvia.in and that you are not mixing them with older self-hosted assets. |
| Chat area appears before the widget is ready | The page shows its chat area before the widget finishes loading | Keep your own loader visible until config.onReady runs, then reveal the chat area. |
| Inline chat not visible | Target container has no height | Give container explicit height in mode: "chat". |
| Widget still shows old embed behavior | Page is reusing an older snippet or loading an older SDK include | Replace the page code with the latest minimal embed snippet from docs and retest after removing older copied SDK tags. |
Fast Debug Checklist
text
1) confirm chatbotsdk-web.css loads on the page2) confirm chatbotsdk-web.iife.js loads on the page3) confirm chatbotKey is present and valid4) confirm custom options are grouped inside config5) confirm both SDK asset URLs load from https://cdn.cortexvia.in and not from an older local copy6) confirm mode is exactly "chatbot" or "chat"7) for mode "chat", confirm host container has fixed height8) test the minimal embed snippet, then add options one by one
Minimal Test
html
<link rel="stylesheet" href="https://cdn.cortexvia.in/chatbotsdk-web.css" /><script src="https://cdn.cortexvia.in/chatbotsdk-web.iife.js"></script><div id="cv-chat"></div><script>window.ChatbotSDK.mount("#cv-chat", {chatbotKey: "ctx-cb-xxxxxxxxxxxxxxxx",config: {mode: "chatbot"}});</script>
If this test works, add options gradually: title, avatars, and then styleOverrides.
Stability Practice
Keep the stylesheet and script URLs paired from the latest CDN files. If the widget still looks old after an update, replace older copied tags or files with the current docs snippet.