How to use developer options with an embedded chatbot?

Markdown

View as Markdown

Collectchat gives you developer options to customize your chatbots based on the conversation and interactions between user and chatbot. These options work with the Website widget, and you can also use them when you embed your chatbot.

To use developer options with an embedded chatbot, the following script needs to be added along with your embed code:

<script async type="text/javascript" src="https://collectcdn.com/embed.js"></script>

The embed code in your dashboard already includes this script. Go to the Share tab and choose Embed under Share as.

Choose 'Embed'

Under Iframe, click the copy icon to copy the embed code. The embed.js script is included at the end of the code, so you can paste it into your website as it is.

Copy the embed code

Tip

If you embedded your chatbot a while ago, your website may still have the older embed code without this script. In that case, add the script above right after your iframe code, or copy the embed code again from the Share tab.

Note

Following JavaScript methods are not available for embedded chatbots.

collectchat.config()
collectchat.open()
collectchat.close()
collectchat.toggle()
collectchat.load()
collectchat.unload()
collectchat.onThankyou()

You can use rest of the functions mentioned in developers.collect.chat

Was this article helpful?

Still need help?

Contact us