Adding live chat to a website sounds like a job for a developer. In practice, most chat widgets are a single line of JavaScript that you paste into your site once. The tricky part is knowing where that line goes on your particular platform, and what to set up afterwards so the chat actually helps your visitors.
This guide covers both. It walks through the general method that works on any site, then the usual place to paste the code on the most common platforms, and finishes with a short checklist for making your chat useful from day one.
How website chat widgets work
A chat widget is a small script that loads alongside your page. When it runs, it draws a chat bubble, usually in the bottom corner, and connects that bubble to an inbox where you or your team read and reply to messages.
Because the script is loaded on every page, you only need to add it in one place: somewhere that appears site-wide, such as your theme footer or a global code setting. The usual recommendation is to place it just before the closing tag. That way your page content loads first and the chat appears once everything else is in place.
A well-built widget also loads asynchronously, which means the browser doesn't wait for it before showing your page. That matters, because a chat tool that slows your site down can cost you more visitors than it wins.
The general method (works on any site)
- Get your snippet. Sign up for your chat widget and copy the one-line script it gives you. It will be unique to your account so messages reach the right inbox.
- Find your site-wide footer or code area. This is the part that varies by platform (see below).
- Paste the snippet just before . If your platform gives you a "footer code" box rather than raw HTML, paste it there.
- Save and publish. Some site builders only apply custom code to the live site, not the editor preview.
- Test it. Open your site in a private browser window, start a chat and check it arrives in your inbox.
Where to paste the code on popular platforms
Menu names change from time to time, so treat these as signposts rather than exact click-paths. If in doubt, your platform's help pages will have a guide to "adding custom code" or "adding a script to the footer".
WordPress
You have two common options. The simplest is a header-and-footer code plugin, which gives you a box labelled something like "footer scripts" in your dashboard. Paste the snippet there and save. Alternatively, if you are comfortable editing your theme, the snippet can go in the footer template just before . Use a child theme if you go this route, so a theme update doesn't wipe your change.
Shopify
From your admin, go to your online store's themes, choose to edit the code of your current theme, and open the main layout file (usually theme.liquid). Paste the snippet just above the closing tag and save. It's sensible to duplicate your theme first so you have a backup.
Wix
Wix provides a custom code area in your site settings where you can add a script and choose to load it on all pages, placed in the body end. Note that Wix restricts custom code on some plans, so check your plan supports it.
Squarespace
Squarespace offers a code injection setting with a footer field that applies across your whole site. Paste the snippet into the footer box and save. As with Wix, code injection depends on your plan.
Plain HTML sites
Open each page template (or your shared footer include, if you use one) and paste the snippet immediately before . If your site has many separate HTML files without a shared footer, you'll need to add it to each page you want the chat to appear on.
Troubleshooting: the bubble isn't showing
- Caching. Clear your site's cache (and any caching plugin or CDN) and reload in a private window.
- Wrong location. Make sure the code is in a site-wide area, not a single page or a draft theme.
- Incomplete paste. Check the whole line was copied, including the opening and closing script tags.
- Ad blockers. Some browser extensions hide third-party scripts. Test with extensions turned off.
- Not published. Site builders often need you to publish before custom code goes live.
Setting it up so it actually helps
Installing the widget takes minutes. Making it worth having takes a little thought. These are the settings that make the biggest difference.
Write a greeting that invites a question
"Hi, how can we help?" is fine, but a greeting tied to what people actually ask works better. A shop might try "Questions about sizing or delivery? Ask us here." A service business might use "Want a quick quote? Tell us what you need."
Match your brand colour
A chat bubble that looks like part of your site feels trustworthy. One that clashes looks like a pop-up advert. Set the widget colour to match your buttons or logo.
Make sure you'll notice new chats
The fastest way to lose a visitor is to leave their message unanswered. Turn on notifications so you know the moment someone starts a conversation, and decide who on your team is responsible for replying.
Capture contact details
Not every chat ends in a sale there and then. Asking for a name and email lets you follow up if the visitor leaves before you reply, or if their question needs a proper answer later.
Be honest about availability
If you're a small team, you won't be online at 3am. Say in your greeting when you usually reply, so visitors know what to expect rather than assuming they've been ignored.
A quick comparison of where the code goes
| Platform | Usual location | Watch out for |
|---|---|---|
| WordPress | Footer scripts plugin or theme footer | Theme updates overwriting edits |
| Shopify | theme.liquid, before | Back up your theme first |
| Wix | Custom code, body end, all pages | Plan restrictions |
| Squarespace | Code injection footer | Plan restrictions |
| Plain HTML | Before on each page or shared footer | Missing pages without a shared footer |
Getting started with the TDesk Chat Widget
If you're looking for a straightforward way to do all of the above, Transcom's TDesk Chat Widget is free for live human chat, with no card needed. It works on WordPress, Shopify, Wix, Squarespace or plain HTML, installs with a single script line placed before the closing body tag, and loads asynchronously so it won't slow your pages down.
Every conversation lands in your TDesk inbox, where you and your team can reply live from any device. You get an email the moment someone starts a chat, you can set your own greeting and brand colour, and you can collect a name and email to follow up later. Optional AI auto-answering from your own knowledge base is listed as coming soon, as a paid upgrade.
Get the free Chat Widget and add live chat to your site.
Originally published at https://transcom.co.uk/blog-chatwidget.html
