Short answer
To add a chat to your website, paste one line of code before the closing </body> tag, or put it in the footer field of your site builder. Writing the dialogue script of the chat, meaning the greeting, the question and the request for a contact, takes longer than the install itself.
On WordPress you can do it with a header-and-footer plugin such as WPCode, without touching theme files.
Key takeaways
- A ready widget with one line of code is the fastest way. Your own HTML chat only makes sense if a developer will also maintain it.
- Write the dialogue script before you install: a greeting, one question, then a phone number or an email.
- After the install, open the site in a private window and send yourself a test message. A chat you have never tested may not work.
Four ways to add a chat, and what each one costs you
Pick by who will maintain the chat in a year, not by who can install it today. Four routes are common.
Ready widget, one line of code
Fits when you want the chat live today and can edit the site footer.
- The catch: the dialogue has the shape the vendor built. You change the texts, not the structure.
No-code chatbot builder with a visual flow editor
Fits when you need many branches: different questions for different products.
- The catch: more setup, and every branch is another place for a mistake. Someone has to keep the flows up to date.
Your own chat in HTML and JavaScript
Fits when a developer is on your team and you need something unusual.
- The catch: you also build storage, spam filtering, email alerts and the phone layout, and you maintain all of it.
WordPress chat plugin
Fits when the site is on WordPress and you prefer to install from the dashboard.
- The catch: one more plugin to update and to keep compatible with your theme.
No-code chatbot or chat HTML code: what is the difference
No-code chatbots exist so that the person who knows the customers can write the dialogue without asking a developer. The three terms below overlap, so here is how they differ.
- No-code chatbot
- A chat whose messages you edit in a panel, while the code that draws the window belongs to the vendor. You type the greeting into a form, press save, and the change is live.
- Live chat HTML
- The markup of a chat window, which you get or write yourself. You connect the behaviour: where messages are stored, who is notified, what happens on a phone. It gives full control and a long to-do list.
- No-code chatbot builder
- Sits between the two. It adds a visual editor where you drag blocks and draw branches.
If one sheet of paper holds your whole dialogue, a widget with fixed steps is enough; if every product line needs its own path, look at a builder.
How to add live chat to a website in five steps
Adding a live chat to a website takes the same steps as adding a chatbot, because both arrive as one line of code. Whether you want to know how to add live chat to website pages or how to add a chatbot to your website, follow the list. If you need people answering in real time, check that the chat tool offers it. Only step 2 is specific to askbox.
Write the dialogue script first
Open a text file and write the greeting, the question and the closing line, as described in the next section.
Copy the code from your panel
In askbox you log in to the panel at app.askbox.app, open Install and copy the line. It already contains your project key; the key in the line below is a placeholder.
<script async src="https://w.askbox.app/w.js?id=YOUR_KEY"></script>Paste it before the closing body tag
Put the line just above
</body>in your template. In a site builder, use the footer field; this works wherever your platform lets you add custom code.Check the site in a private window
The button should appear in the corner after the delay you set.
Send yourself a test lead
Go through the dialogue as a visitor, leave your own email, and confirm that the notification arrives. A test lead counts towards your first 10 free leads.
If you run WordPress
Use a header-and-footer plugin and paste the line into its footer section, or add it to the footer.php of your theme. A theme update overwrites the second edit unless you work in a child theme. The WordPress install page shows every click and lists what to check if the button does not appear.
If someone else maintains the site, the Install page of the panel can email the code to them, up to 3 emails a day per project.
How to write the dialogue script: greeting, question, contact
A working chat script has three parts, and each should fit on one screen of a phone.
Greeting: say who is writing and what you can do
Two short messages usually read better than one long one. The first names the company, the second invites one specific question. “Hi! This is [company]. Ask us about delivery, prices or repairs” works better than “How can I help you today?”.
Question: ask for one thing in the visitor’s own words
Let the visitor type the question, then react to it. In askbox you set the minimum length of the question and the pauses between your messages.
Contact: offer a choice
Ask “Phone or email?” rather than “Leave your details”. A visitor who picked a channel knows how you will reply.
Before
Welcome to our website. How can we help you?
After
Hi! This is [company]. Ask about delivery to [city], prices or opening hours.
Before
Please enter your contact details.
After
Where shall we send the answer: by phone or by email?
Check the script before you launch
- The first message names the company and invites one specific question.
- The visitor types the question in their own words; you set its minimum length.
- The contact step asks “Phone or email?” rather than “Leave your details”.
- Every bracket, such as [company] or [city], is replaced with real text.
- Each part fits on one screen of a phone. Open the chat on your own phone to see it.
Mock chat script examples for support and sales
These two are examples written for this guide, not templates from any tool. Replace the brackets and keep the order.
A support chat script has one job: find out what went wrong and who to answer. This one is for a repair shop; use it as a base for any chat script for customer service.
- Bot: “Hello, this is the service desk of [company].”
- Bot: “Tell us in one sentence what went wrong.”
- Visitor types the problem.
- Bot: “Thanks, we have it. Shall we answer by phone or by email?”
- Visitor picks one and leaves the contact.
- Bot: “Done. We reply on working days before noon. Please have your order number to hand.”
A sales chat script asks about the need before the price, so the visitor feels heard and you get a number to call. This one is for an online shop.
- Bot: “Hi! Looking for a quote? Tell us what you need.”
- Visitor types the request.
- Bot: “Good. We deliver to [city] in [days] working days. Where shall we send the exact price: phone or email?”
- Visitor leaves the contact.
- Bot: “Thank you. You will have the price today.”
What the chat costs, and what the widget cannot do
askbox costs a monthly fee plus a price per lead that falls as the number of leads in a month grows; VAT is added. The pricing page has a calculator.
A lead is a visitor who left a phone number or an email. A chat that ended without a contact is not billed.
Good fit if you…
- You want visitors to leave a phone number or an email, not to hold a long conversation.
- You can write the dialogue yourself and want it live the same day.
- Your site accepts a line of HTML before the closing body tag.
Skip it if you…
- You want an AI that answers any question. The bot says only what you wrote; the optional AI consultant is off until you switch it on.
- You need leads in a CRM, Telegram or a webhook. At launch they go to email and the panel.
- You need a branching tree with many paths. The dialogue has a fixed order: greetings, a question, phone or email.
If you are unsure whether a scripted bot or a person typing in real time fits you better, read chatbot vs live chat first. For replies you will want to reuse, see canned responses.
Questions about adding a chat to a site
How do I add a chatbot to my website without coding?
Choose a widget that installs with one line, paste that line before the closing body tag or into the footer field of your site builder, and write the dialogue in the vendor’s panel. You do not edit the widget’s own code.
How do I show the chat only on some pages?
Use display rules; that is how to add live chat on website pages only where you need it. In askbox a rule matches the page address by “contains”, “starts with”, “equals” or a regular expression, so you can show a different dialogue on the price page than on the blog.
Do I need a developer to install it?
Not if you can edit the footer of your site or paste into a plugin. If you cannot, the panel can email the line to whoever maintains the site.
Is a no-code chatbot enough for customer support?
For repeating questions and collecting a contact, yes. For disputes or long case histories, answer by phone or email and use the chat only to start the conversation.
Add your first chat in one line
Write the greeting, the question and the thank-you in the panel, paste the line before the closing body tag, and test it from your own phone.
Start free trialFree for your first 10 leads · spam caught by the system costs €0 · leads stored in the EU