I’m having trouble getting the HubSpot chat widget to display properly in my Electron application. The chat bubble simply won’t appear even though the script loads correctly.
Here’s my basic HTML structure:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>My App</title>
</head>
<body>
<h1>Welcome to my app</h1>
<script type="text/javascript" id="hs-script-loader" async defer src="https://js.hs-scripts.com/123456.js"></script>
</body>
</html>
The issue seems to be that Electron doesn’t serve files through a traditional web server. When I test the same HTML file by opening it directly in Chrome using the file protocol, the chat widget doesn’t show up there either.
I can see in the network tab that the HubSpot script is being downloaded successfully, but the chat interface never renders. Has anyone successfully implemented HubSpot chat in an Electron app? What configuration changes are needed to make this work?