Insert this snippet before the </body>
tag.
<div
id="spinoco-webchat-plugin"
data-config-url=""
data-customer-name=""
data-customer-email=""
data-bot-avatar-url=""
data-user-avatar-url="">
</div>
<script type="module" src="https://cdn.spinoco.com/webchat/v2/spinoco-webchat-plugin.js"></script>
data-config-url
location of configuration file, requireddata-customer-name
name of customer, optionaldata-customer-email
email of customer, optionaldata-bot-avatar-url
bot avatar image url, optionaldata-user-avatar-url
user avatar image url, optionaldata-bot-avatar-base64
bot avatar image in base64, optionaldata-user-avatar-base64
user avatar image in base64, optional
If you need to open webchat programmatically, you can use the following code:
spinocoWebchatPlugin.openChat();
This will open chat window.
Sometimes, you need to open chat window as a result of customer interaction with your page, for example, when customer clicks on a link. You can use the following code:
<a href="#sp-webchat;open">Open Chat</a>
Once user clicks on the link, chat window will be opened.
- Call method bellow from javascript. You can test it from browser console.
spinocoWebchatPlugin.showPopover("label", "buttonLabel", 1);
label
popover labelbuttonLabel
button label (button opens chat)delay
delay in seconds before popover is opened