Integrations
Everything you need to connect Hokkot to your website and your systems. If something is unclear, write to us in the chat — we’ll help.
Installing the widget
Copy the code from the project card in the back office and paste it before the closing </body> tag on every page:
<script src="https://widget.hokkot.com/v1.js"
data-project="YOUR_PROJECT_KEY" async></script>
The script is small, loads asynchronously and keeps its styles isolated, so it won’t conflict with your design.
Google Tag Manager
If the site is managed through Google Tag Manager, you don’t need to touch the code at all:
- Create a new Custom HTML tag and paste the widget code into it.
- Set the trigger to All Pages.
- If your site puts the user’s ID into the dataLayer, Hokkot picks it up automatically — the operator will see which account is writing.
- Publish the container.
The project card in the back office has a ready-made GTM tab with both tags, so you only need to copy them.
Identifying signed-in users
Pass user data with attributes on the script tag, or from your own code:
<script>
window.LiveChat.identify({ id: '58213', name: 'Mark', email: '[email protected]' });
</script>
The operator sees the name, email and the user’s ID on your site in the customer card.
JavaScript API
window.LiveChat.open()andclose()— open or close the chat from your own code.- Any element with the
data-livechat-openattribute opens the chat on click — perfect for “Contact support” buttons. window.LiveChat.identify()— tell the chat who the user is.
Webhooks
Hokkot sends a POST request to your URL when something happens:
conversation.createda new conversation startedmessage.createda new messageconversation.assignedan operator was assignedconversation.closedthe conversation was closedconversation.ratedthe customer rated the chat
Every request is signed with HMAC-SHA256 using your secret, so you can verify it really came from Hokkot.
CRM
Two ways to show CRM data to operators:
- Link to the customer card. Set a template like
https://crm.example.com/users/{siteUserId}, and the operator opens the profile in one click. - Fields from your CRM. Hokkot sends a signed request with the customer’s data to your URL, and the fields you return — balance, status, number of orders — appear next to the chat.
Want to see it on your own site?
Write to us right here — the chat button is in the corner. We’ll answer your questions and help you get set up.