Control the Webchat widget
Script
Description
window.protoSettings = {
id,
...
onOpen: () => console.log('Webchat opened'),
onClose: () => console.log('Webchat closed'),
};
<script type="text/javascript">
window.protoSettings = {
id: '',
showToggleButton: false
onInit: function () {
}
};
var prs = document.createElement('script');
prs.src = 'https://embed.proto.cx/index.umd.js';
prs.type = 'text/javascript';
prs.async = true;
prs.onload = function () {
window.proto.init(window.protoSettings);
};
document.head.appendChild(prs);
</script>Last updated