Webchat script
Customise the display of a Webchat popup on a webpage.
Last updated
<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><script type="text/javascript">
window.protoSettings = {
id: 'CHANNEL ID',
onInit: function () {
window.proto.identify('YOUR CUSTOM ID');
},
};
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>window.proto.identify("CUSTOM_ID", {
phone_number: "xxxxx",
email: "user@example.com",
custom_fields: {
Token: ""
}
});