Insights

Chat widget: what it is, what to look for and how to install

What a chat widget is made of, which settings change results, how to install one with a single script tag and a short checklist to test it before launch.

By the Askocto team · · 5 min read

A chat widget is the small chat window on a website that lets a visitor talk to your business without leaving the page. It usually appears as a bubble in a corner and opens into a conversation with an AI agent, a person or both. This article covers its parts, the settings that matter, how installation works and a test list before you publish.

In short: A good widget loads fast, opens where the customer expects it, greets people with a useful first line, stays out of the way on pages that need space, and hands over to a person without losing the conversation.

The parts of a chat widget

Every widget, whatever the vendor, is built from the same few parts. Knowing them helps you ask for the right thing.

  • Launcher. The bubble or button that opens the chat. Its position, color, icon and label decide whether people notice it.
  • Greeting. The first message, and optionally a floating teaser above the launcher. This is the piece of copy that does the most work in the widget.
  • Message area. Where the conversation happens, including suggested replies, links, images and file uploads.
  • Rich components. Cards and forms inside the chat, such as an order tracking card, a booking picker or a product card.
  • Identity. The link between the visitor and a customer record, so the agent knows who it is talking to.
  • Handover. What happens when the conversation needs a person: the transfer, the waiting message and where the reply lands.

Settings that change results

Most teams spend a day on colors and five minutes on the settings below. Reverse that order.

The first message

"Hi, how can I help?" tells people nothing. A greeting that names what the chat can do works better, for example "Ask about orders, returns or sizing. A person joins if I get stuck." Say clearly that it is an AI assistant if it is.

Suggested messages

Three or four buttons with the most common questions lower the effort of starting. Take them from your real data, not from guesses. Review them monthly.

Where it appears

Show it on the pages where questions happen: product pages, pricing, checkout, account. Hide it where it blocks content, such as a mobile checkout button or a form. Give pages with different audiences different greetings.

Hours and expectations

If people are available only on weekdays, say so in the handover message and offer an email option for the rest. A widget that promises a reply and goes silent costs more trust than having no widget.

How installation works

Most modern widgets install with one line of code placed before the closing body tag, or through a plugin for your site builder. An example with an Askocto agent looks like this:

<script src="https://cdn.askocto.co/embed.js"
  data-agent-id="agt_123" defer></script>

The defer attribute lets your page finish loading before the widget starts, so your site's speed does not suffer. After that you can control the widget from your own code. In Askocto, a global object lets you open or close the chat, identify the signed-in user and pass context such as the current plan or cart. The details are in the website integration docs, and a step-by-step guide is in how to embed an AI chat widget on any website.

If you would rather not embed a bubble, the same conversation can sit inside a page as an iframe, for example on a help page.

What a widget needs behind it

The window is the visible part. What matters more is what answers the questions. A widget connected to nothing is a contact form with a face. Before launch, check:

  1. Knowledge. Which sources does it read, and are they current?
  2. Actions. Can it look up an order or book a slot, or only reply with text?
  3. Escalation. Does a person receive the full transcript?
  4. Analytics. Can you see what people asked and where it failed?

These decide whether the widget resolves questions or only collects them. The article on FAQ chatbots shows the simplest version of the pattern, and chatbot use cases shows what each kind of job needs behind the window.

A pre-launch checklist

Test on a phone and a laptop, signed in and signed out.

  • The launcher is visible but does not cover a button or a cookie notice.
  • The greeting reads well in the language of the page.
  • The chat opens and closes with the keyboard and with a tap.
  • Text is readable at your site's contrast and zoom settings.
  • A long answer scrolls without moving the page behind it.
  • A question the agent cannot answer ends with a handover or a clear next step.
  • Page speed is the same before and after installation.
  • The widget does not appear on pages where it should be hidden.

Ask two colleagues who did not build it to try five real questions each and tell you where they got stuck.

Choosing between widget types

Option Good for Watch out for
Floating bubble General support on most pages Covering page elements on mobile
Embedded iframe A dedicated help page or app screen Needs a spot in the layout
Link to a hosted page Email footers and social profiles Leaves your site
In-app SDK Mobile apps with signed-in users Needs developer time

You can see how widgets and the components inside them are built on the widgets feature page.

Frequently asked questions

What is a chat widget?

A chat widget is a chat window embedded on a website that lets visitors message your business. It can be answered by an AI agent, a person or both.

Does a chat widget slow down my website?

It can if it loads before your page content. Choose one that loads after the page and test your page speed before and after installation.

Can I add a chat widget without a developer?

Usually yes. Most widgets need one script tag or a plugin for your site builder, and the look and greeting are set in a dashboard.

Should the chat widget appear on every page?

Not always. Show it where visitors ask questions and hide it where it covers important content or interrupts a task.

Train an agent on your own help center

Askocto answers the repeat questions across chat, email and voice and hands the hard ones to your team.

Keep reading

All articles
Insightscustomer support ai glossary
Nov 16, 20267 min read

Customer support AI glossary: 40 terms explained

Forty customer support AI terms in plain English, from LLM and grounding to resolution rate and prompt injection, grouped by theme so you can read in order or look up one word.

Read article
Insightscustomer support automation ideas
Nov 6, 20266 min read

15 customer support automation ideas to start this quarter

Fifteen support tasks you can automate, in three tiers ordered by effort and risk, with what each needs and where it can go wrong. Pick a first batch and move up as it holds.

Read article
Insightscustomer support chatbot
Nov 19, 20254 min read

Customer support chatbot: 7 behaviors it needs on day one

A customer support chatbot does not need every feature on day one. It needs seven behaviors, from answering from sources to handing over cleanly, and a sample conversation shows them.

Read article