Start free

Add Hazelchat to your Hostinger site

Add Hazelchat’s chat agent to every page of a site made with Hostinger’s website builder in manual mode, through its Custom code integration. Hazelchat answers your visitors from the pages and documents you approved, and shows the sources under every answer.

What you need

Add the code

  1. In Hazelchat, open the install step (Install in setup, or Website → Install on your website), choose Something else and click Copy the code. It is one line with your own widget key:
    <script src="https://app.hazelchat.co/widget.js" data-agent="YOUR-WIDGET-KEY" defer></script>
  2. In the builder, click More (the ⋯ button), then Integrations.
  3. Paste the line into Custom code. Hostinger places script tags at the end of the page by itself, so leave the line as it is.
  4. Click Save, then update your website. Hostinger adds the code to your live site only when you update it.
  5. Back in Hazelchat, enter your website’s address and click I’ve added the code.
  6. Click Publish and switch on (or Switch on if your agent is already published). Hazelchat first looks for the code on your website and only then makes the chat visible.
  7. Open your website, refresh it, ask the chat a question a visitor would ask, then return to Hazelchat and click Yes, I saw this answer.

These steps follow Hostinger’s own help (How to integrate custom code and How to add a cookie banner), read on 14 October 2026. We have not yet tested Hazelchat on Hostinger ourselves. If a menu looks different, Hostinger’s page is the up-to-date one.

Check it works

Hostinger’s help says this code goes into the page itself, so Hazelchat’s check can find it when you switch the chat on. If your home page does not carry the code, enter the page that does under Installation troubleshooting → Page the script is on.

Common problems

Hostinger’s cookie banner holds back Hostinger’s own tracking integrations until a visitor agrees. Hostinger’s help does not say that it holds back custom code, so expect the chat to load for every visitor unless you use the option below.

To keep the chat closed until a visitor agrees, add data-require-consent="true" to the line, before defer. The chat then waits until your consent tool sends:

window.dispatchEvent(new CustomEvent('hazelchat-consent', { detail: true }));

Send detail: false when a visitor withdraws consent. With this option and no event, no chat appears, so test it on your published site.

Remove Hazelchat

Help

For Hostinger itself, use Hostinger’s help center. For anything in Hazelchat, email hello@hazelchat.co. We answer within one business day. Other ways to install Hazelchat.

Start free