Chatness Widgets
Learn how to configure and use Chatness Widgets.
Currently we are only supporting the Launcher
and Messenger
widgets. Stay
tunned by subscribing to our
changelog and get notified when
new widgets are released.
Launcher
Now it's time to embed Chatness Launcher into your projects. You can achieve this by adding the following code snippet to your website, right before the closing </head>
tag.
<script>
(function () {
const script = document.createElement('script');
script.src = 'https://cdn.chatness.app/embed.js?v={current_chatness_version}';
script.async = true;
document.head.appendChild(script);
script.addEventListener('load', () =>
window.Chatness.Launcher.open({
url: 'https://{my_chatness_project}-launcher.web.app',
})
);
})();
</script>
Note that if you updated the primary color, changes to the Launcher may take up to 60min to reflect due to the cdn cache. If you need to skip that cache just append a random v
to the launcher url. eg: https://{my_chatness_project}-launcher.web.app?v=update_now
Messenger
If you ever need to open the messenger programatically, you can do it by calling the open
method on the Messenger
object.
<script>
document.addEventListener('load', () => {
document.getElementById('chat').addEventListener('click', () => {
window.Chatness.Messenger.open();
})
})
</script>
<a id="chat">Talk to us!</a>