<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()
Copy
Ask AI
<!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>