1. Install on the main product or marketing site
Start where customers and trial users actually ask questions, not on every property at once.
The widget is HAL's customer-facing entry point. It powers the inbox, help deflection, and support signals that can influence the operator loop.
Add the embed script to your site after you create a project in HAL.
<script
src="https://api.chatwithhal.com/widget.js"
data-project-id="your-project-id">
</script>You can force the widget UI language from your app in two ways: directly on the embed script with data-locale, or through the JavaScript init() API.
data-locale on the script tag<script
src="https://api.chatwithhal.com/widget.js"
data-project-id="your-project-id"
data-locale="de">
</script>locale in HalWidget.init()<script src="https://api.chatwithhal.com/widget.js"></script>
<script>
window.HalWidget.init({
projectId: 'your-project-id',
locale: 'de'
});
</script>locale should be a supported language code such as en, de, fr, or slinit() overrides the widget's default language setting in HALWhen the widget sends CRM stage information, HAL treats it as a lower-authority signal by default. If your sales team has already moved a company to a later stage, widget updates will not downgrade it.
advance_only keeps manual sales progress authoritativeexact applies the requested stage exactly, including intentional downgradesUse exact only when your own backend is the CRM system of record and should override later stages.
If your product already knows the value of a trial, quote, or expansion, you can push that data into HAL from the widget script after the visitor has been identified.
<script
src="https://api.chatwithhal.com/widget.js"
data-project-id="your-project-id">
</script>
<script>
await window.HalWidget.identify({
email: 'buyer@example.com',
company: { name: 'Acme' }
});
await window.HalWidget.setDeal({
deal_value: 12000,
stage_name: 'Qualified'
});
</script>deal_value writes to the linked company record in HAL CRMstage_name is optional and follows the same precedence rules as setStage()identify() with an email firstIf your app supports login/logout, reset the widget when the user signs out. This clears the current browser-side widget identity and remounts the widget with a fresh anonymous visitor so the next user can be identified cleanly.
// After your app logs the user out
await window.HalWidget.resetIdentity();
// Later, after a different user logs in
await window.HalWidget.identify({
user_id: 'user-456',
email: 'new-user@example.com',
user_hash: 'server-generated-hmac'
});Start where customers and trial users actually ask questions, not on every property at once.
The widget gets much better once your help-center and operating context are in place.
Use HAL to recommend and draft responses, then choose the level of automation you are comfortable with.