How to add a chatbot to your website
Adding a chatbot to a website sounds technical, and it isn't. Nearly every chatbot is added the same way, by pasting a short piece of code into your site once. This guide explains what that code is, where it goes on each kind of website, and how to check it worked.
What you're actually adding
A chatbot doesn't live on your website. It lives with the company that provides it. What you add to your site is a short piece of code, usually three to eight lines, that tells a visitor's browser to fetch the chat and show it in the corner. People call it a snippet, an embed code or a script. They all mean the same thing.
Because the chat is fetched fresh each time, you paste the code once and never again. When you change the chatbot's colour or what it says, you do it in the provider's dashboard and your website picks it up.
Where the code goes
It needs to be on every page, near the end. On most websites that means one place: the footer, or a box in your settings for "custom code". The words differ from one website builder to the next, and so do the rules about which plans allow it.
- WordPress. Through your page builder's custom code screen, your theme's footer code box, or a small plugin for header and footer code. Steps for WordPress, and for Elementor.
- Wix. In Settings, under Custom Code, placed at the end of the body on all pages. Wix only allows this on a site connected to its own domain. Steps for Wix.
- Squarespace. In Code Injection, in the Footer box. Not every Squarespace plan includes it. Steps for Squarespace.
- Shopify. In your theme's code, in the file called theme.liquid, just before the closing body tag. Steps for Shopify.
- A website built by hand, or by a web designer. Just before the closing body tag on each page, or in the shared footer file.
Before you paste anything
- Set the chatbot up first. Give it your information and try it in the provider's own preview. There's no point putting an unfinished chatbot in front of customers.
- Check you can get in. You need a login for your website with permission to change settings or code. If you don't have one, whoever built the site does.
- Take off any old chat. If there's already a chat button on your site, remove its code first. Two buttons in one corner is a mess.
How to check it worked
Open your website in a private or incognito window, so you see what a visitor sees and not a saved copy. Look in the bottom corner. Open the chat and ask it something. Then look at it on your phone, where the corner is more crowded.
If it isn't there, the cause is nearly always one of three things. The change hasn't been published, a cache is still serving the old page, or the code was added to one page and not the whole site.
What to say to your web designer
If someone else looks after your website, send them the code and this sentence: "Please add this just before the closing body tag on every page, and let me know when it's live." It's a five minute job for anyone who knows the site. If they quote you for a day's work, ask why.
If you'd like to see one working first
You can try NatterNinja on your own website without adding anything. Type your address and it builds an assistant from your pages there and then, so you can see what it would say before you touch your site.
Common questions
Will adding a chatbot slow my website down?
It depends on the chatbot. A well-made one loads after the rest of your page, so visitors see your website just as quickly. Ask the provider, or test your page speed before and after.
Do I need to know how to code?
No. You copy the code from the provider and paste it into one box. You don't need to understand it or change it.
Can I add a chatbot to a free website builder plan?
Often not. Several website builders only allow custom code on paid plans or on sites with their own domain. Check your plan before you choose a chatbot.
How do I remove it again?
Delete the code from the place you pasted it and publish. The chat disappears.
See it answer questions about your own business
Type your website address and chat with your assistant in under a minute. There's no sign-up and no card.