Kindly
Search…
Chatbubble (deprecated)
Note that this is documentation for the deprecated chatbubble which will not receive any new features nor bug fixes. From June 1st 2020 we have stopped supporting it completely.
Head on over to the Kindly Chat docs for how to use the latest version of our chat client for web.

Get the embed code

Start by navigating to your bot in the Kindly platform.
Select Connect from the left-hand menu, then go to Publish.
View the embed-code by selecting Show HTML code.
A popup view will display, containing the embed-code you need embed the chatbubble on your webpage. Go ahead and copy the embed-code on to your clipboard by selecting it and hitting the copy button (Mac: CMD+C, Windows: CTRL+C) or simply hit the Copy to clipboard button.
The embed-code should look something like this:
1
<script type="text/javascript">
2
(function(key, context, settings) {
3
try {
4
window.chatbubbleKey = key;
5
window.chatbubbleLocalContext = context || window.chatbubbleLocalContext || {};
6
window.chatbubbleLocalSettings = settings || window.chatbubbleLocalSettings || {};
7
var scriptEl=document.createElement('script');
8
scriptEl.type='text/javascript';
9
scriptEl.async='async';
10
scriptEl.src='https://chatbubble.kindly.ai/chatbubble.js';
11
var targetEl=document.getElementsByTagName('script')[0];
12
targetEl.parentNode.insertBefore(scriptEl,targetEl);
13
} catch(e) {/* Error handling */}
14
}('YOUR-CHATBUBBLE-KEY'));
15
</script>
Copied!

Deploying the chatbubble

Once you have copied the embed-code, your ready to add the chatbubble to your page. This should be a simple process that involves updating an HTML template. We recommend pasting the embed-code to the bottom of your HTML template, before the closing </body> tag.
If this sounds strange, foreign or scary, we recommend you contact your website administrator or a developer in your organization for further assistance.

Customizing

There are two options available for configuring the Chatbubble appearance and behaviour:
  • Set default settings directly through the Kindly platform.
  • Override the default chatbubble settings within the embed-code. This allows for some per-page chatbubble customization.

Set default behaviour and appearance

Start by navigating to your bot in the Kindly platform.
From the left-hand menu, open Settings, then go to Chat bubble.
Configure the chatbot behaviour and appearance according to your needs.

Override behaviour or appearance per page

Sometimes the chatbubble need slightly different behaviour or appearance depending on the page the user is visiting. This can be accomplished using some modification to the original embed-code. Use the following embed-code for overriding the settings. Remember to replace the part that says 'YOUR-CHATBUBBLE-KEY' with the value from your original embed code.
NOTE: In this example, all the available settings have been commented out. To activate a setting, uncomment the line by removing the "//" in the beginning of it.
1
<script type="text/javascript">
2
(function(key, context, settings) {
3
try {
4
window.chatbubbleKey = key;
5
window.chatbubbleLocalContext = context || window.chatbubbleLocalContext || {};
6
window.chatbubbleLocalSettings = settings || window.chatbubbleLocalSettings || {};
7
var scriptEl=document.createElement('script');
8
scriptEl.type='text/javascript';
9
scriptEl.async='async';
10
scriptEl.src='https://chatbubble.kindly.ai/chatbubble.js';
11
var targetEl=document.getElementsByTagName('script')[0];
12
targetEl.parentNode.insertBefore(scriptEl,targetEl);
13
} catch(e) {/* Error handling */};
14
}('YOUR-CHATBUBBLE-KEY', null, {
15
// avatar: 'https://something-something.io/avatar.jpg',
16
// chatbubble_autopopup: false,
17
// chatbubble_autopopup_time: 10000, // in milliseconds
18
// chatbubble_keep_open: true,
19
// chatbubble_persist_state: false,
20
// collect_feedback_thumbs: false,
21
// name: 'Your bot name',
22
// placeholder: 'Ask me a question…',
23
// primary_language: 'nb',
24
// start_over_text: 'Restart',
25
// typing_duration: 1000,
26
// typing_indicator: true,
27
}));
28
</script>
Copied!

Set language

If you need to pre-configure which language the bot should use to greet the user, just set window.chatbubbleLocalLanguage to a valid language code (one of da, en, fi, nb, nn, sv). See example below.
1
<script type="text/javascript">
2
(function(key, context, settings) {
3
try {
4
window.chatbubbleKey = key;
5
window.chatbubbleLocalLanguage = 'nb';
6
var scriptEl=document.createElement('script');
7
scriptEl.type='text/javascript';
8
scriptEl.async='async';
9
scriptEl.src='https://chatbubble.kindly.ai/chatbubble.js';
10
var targetEl=document.getElementsByTagName('script')[0];
11
targetEl.parentNode.insertBefore(scriptEl,targetEl);
12
} catch(e) {/* Error handling */};
13
}('YOUR-CHATBUBBLE-KEY'));
14
</script>
Copied!

Authentication (Beta)

Kindly supports authenticated users. When your users are authenticated, it's easier to identify them in the Kindly Inbox and you can create more personalized and powerful webhook integrations.
Go to the Kindly Chat authentication section to start authenticating your users. Authentication using the deprecated chat bubble is no longer supported.
Last modified 4mo ago