How to embed Sendbird AI Chatbot into a GoDaddy site

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.

  1. Copy the Bot script generated from the Sendbird dashboard.

  1. Edit the last line of the script as follows.
  • Replace window with parent
  • and replace document with parent.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>
  1. Follow the instructions here to embed this script to your GoDaddy site.

  2. Set the height of the HTML section you have added to “0 pixels”.