Website widget

Put your agent on your website — chat, or a voice call straight from the browser — with one script tag.

The website widget puts an agent on any page: visitors can chat with it, or talk to it from the browser without dialling a number.

Adding it to a page

Create a widget in the dashboard, style it, and copy its embed script. It looks like this:

<script
  src="https://kilevel.com/kitalk-widget.js"
  data-public-id="kw_your_widget_id"
  async
></script>

Paste it before the closing </body> tag. The widget appears as a launcher in the corner of the page.

Optional attributes

data-contact-name / data-contact-email / data-contact-phonestring

Pass what you already know about a signed-in visitor, so the agent does not have to ask.

data-start-opentrue | false

Open the widget as soon as the page loads.

data-container-idelement id

Render the widget inside an element on your page instead of as a floating launcher — for a dedicated contact page, for example. data-container-scale sizes it.

A widget also has a page of its own, for when there is no website to put it on: an email, a message, a QR code. The widget editor's Share Link section builds the link and copies it:

https://kilevel.com/widget?publicId=kw_your_widget_id&start=call
startopen | chat | call

What the page does once it has loaded. open shows the widget's window, chat goes straight into the conversation, call starts a voice call. Left out, the widget is as you set it up: its launcher, or open if it opens on page load.

name / email / phonestring

Who the visitor is, for a link made for one person — the same as the data-contact-* attributes of the embed script. Whatever you put here is readable in the link.

With start=call the visitor sees the call button over the open widget, and the call starts with their first click or tap anywhere on the page. Browsers give a page the microphone and its sound only after a tap, so a call cannot start before one. Details the widget asks for before a call are asked first.

Anyone who has the link can open it. The allowed websites below limit where the widget is embedded; they do not apply to its own page. A widget that is switched off shows an unavailable page instead.

Behaviour

  • Allowed websites — restrict which origins may embed the widget, up to ten. Leave the list empty to allow any site.
  • Opening on its own — open after a number of seconds on the page, or once the visitor has scrolled a given share of it. Neither applies to a widget rendered inside a container.
  • Cookie notice — an accept/dismiss bar in the widget footer, for sites that need to inform visitors about cookie use.
  • Branding — colours, avatar, launcher icon and all visible texts are yours to set, and the dashboard shows a live preview.

Tip

Restrict allowed websites before you go live. A widget ID is public by nature — it sits in your page source — and the allow-list is what stops another site from using your agent.

Capacity

Website chats count toward your workspace's chat limit — see Concurrency and limits.