Skip to main content
You can install the hotglue widget via the following CDN distribution:
<script src="https://hotglue.xyz/widgetv3.js"></script>
Next, you can initialize the widget using your hotglue environment ID and public API key:
<title>Hotglue Widget</title>
<!-- CSS is now bundled within the JavaScript file -->
<script src="https://hotglue.xyz/widgetv3.js"></script>
<script>
    // Manual approach
    const hotglue = new Hotglue({
    tenantId: '<OPTIONAL TENANT ID FOR PREFETCHING>',
    environmentId: '<ENV ID>',
    apiKey: '<PUBLIC API KEY>'
    });
</script>
Finally, you can open the widget hotglue.openWidget()

<!DOCTYPE html>
<html>
<head>
    <title>Hotglue Widget</title>
    <!-- CSS is now bundled within the JavaScript file -->
    <script src="./dist/widget.js" ></script>
    <script>
      // Manual approach
        const hotglue = new Hotglue({
            tenantId: 'tenant-123',
            environmentId: '<ENV ID>',
            apiKey: '<PUBLIC API KEY>'
        });

      // Control widget
      function openWidget() {
        hotglue.openWidget();
      }
    </script>

</head>
<body>
    <button onclick="openWidget()">Open Widget</button>
</body>
</html>
I