Follow the below instructions to embed the Sendbird AI chatbot into a GoDaddy site OR if you have tried embedding it and facing issues like positioning of the Bot widget and delay in rendering the response from the bot.
- Copy the Bot script generated from the Sendbird dashboard.
- Edit the last line of the script as follows.
- Replace
window
withparent
- and replace
document
withparent.document
The final script will look like this.
<script>
!function(w, d, s, ...args){
var div = d.createElement('div');
div.id = 'aichatbot';
d.body.appendChild(div);
w.chatbotConfig = args;
var f = d.getElementsByTagName(s)[0],
j = d.createElement(s);
j.defer = true;
j.type = 'module';
j.src = 'https://aichatbot.sendbird.com/index.js';
f.parentNode.insertBefore(j, f);
}(parent, parent.document, 'script', '<app-id>', '<bot-name>');
</script>
-
Follow the instructions here to embed this script to your GoDaddy site.
-
Set the height of the HTML section you have added to “0 pixels”.