Pricing Updates ✨ Grouped chats and quick actions Login Start your trial

HTML SDK

Install the Chatness SDK for HTML by injecting the Chatness script tag into a website. The SDK provides a simple way to interact with Chatness API and customize the widget behavior.

Installation

To install the Chatness widget using just HTML, click the rocket button in the top/right corner and copy the code snippet provided into the website's HTML inside the <head> tag.

Site example
<html>
    <head>
        <script>
          // code snippet
          // goes here...
        </script>
    </head>
    <body>
      <!-- Your content -->
    </body>
</html>

The code snippet will look like this:

Code snippet
(function() {
    const script = document.createElement('script');
    script.id = 'chatness';
    script.type = 'module';
    script.src = 'https://cdn.chatness.ai/scripts/widget.mjs?bot={botId}';
    script.async = true;
    document.head.appendChild(script);
})();

The {botId} part can be replaced with the bot's ID. The bot ID is available on the Chatness app settings page, or it may be mentioned in the email received from the developer during the quick onboarding process.


Widget interactivity

After installing the widget, all methods provided by the Browser SDK are available via the global window object for interacting with the widget. Below is an example of opening the widget programmatically:

Open widget after clicking a button
<button id="openChatness">Open Chatness Widget</button>
<script>
  document
    .getElementById('openChatness')
    .addEventListener('click', function() {
      // call the SDK method to open the widget
      window.Chatness.widget.open();
    });
</script>

Get started with Chatness this afternoon

Each subscription goes towards aggressively adding new features built with customers' best interests at heart, including your privacy.

© 2024 Chatness - A product by IntenseloopChatness uptime in the last 180 days