How to add a chatbot to your Wix website in 10 minutes
Adding a chatbot to Wix takes one pasted script. Follow the steps to train your agent, add the code, test on desktop and mobile, and fix the usual problems.
Read articleThree safe ways to put a chatbot on a WordPress site, from a no-risk snippet plugin to a child theme function, with a clear rule for choosing and a test checklist.
By the Askocto team · · 4 min read
You can add a chatbot to WordPress in three ways: paste the embed script through a header and footer snippet plugin, add it to your theme's footer, or load it with a function in a child theme. The plugin method is the safest for most people, because a theme update will not remove it. This guide explains each method, how to choose and how to test afterwards.
In short: Use a snippet plugin unless you have a reason not to. Take a backup first, and test in a private window on desktop and phone.
Make two preparations, whichever method you choose.
Then copy your embed script. In Askocto, you find it in your agent under Channels. It is one line, in this form:
<script src="https://cdn.askocto.co/embed.js" data-agent-id="agt_123" defer></script>
| Method | Best for | Survives theme updates | Skill needed |
|---|---|---|---|
| Snippet plugin | Most sites | Yes | None |
| Theme footer edit | Quick tests, themes you will never change | No | Low |
| Child theme function | Developers, tighter control | Yes | Moderate |
This keeps the code out of your theme and makes it easy to switch off.
The defer attribute in the script lets the page load first, so the footer is a fine place for it.
This works, but updating the theme will usually overwrite your change. Use it only for a quick test.
footer.php.If your host disables the editor, you will need file access over SFTP. Make a copy of the file before you change it, so you can restore it.
A child theme holds your changes apart from the parent theme, so updates do not touch them. Add this to the child theme's functions.php:
function add_support_chatbot() {
echo '<script src="https://cdn.askocto.co/embed.js" data-agent-id="agt_123" defer></script>';
}
add_action('wp_footer', 'add_support_chatbot');
Replace the agent id with yours. If you are not comfortable with PHP, use Method 1. A syntax error in functions.php can take the site down, which is why the backup comes first.
Open the site in a private window so caches and logged-in states do not hide problems.
If you run an online shop on WooCommerce, check the cart and checkout pages carefully, and consider hiding the chatbot on payment pages. The guide to AI customer support for Shopify stores discusses store-specific questions that apply to other shop platforms too.
defer attribute should keep the impact small.Many sites do better when the chatbot is on pricing, product and help pages and absent from sensitive pages. Most snippet plugins let you pick pages, or you can control the widget through the JavaScript object that the script provides. The website integration docs list the options for opening, closing and passing context.
When you are satisfied, review the first week of conversations and add missing answers to your content. For the same job on another builder, read how to add a chatbot to your Wix website. To try the chatbot itself, you can sign up for a free Askocto workspace.
No, you can edit the theme footer or use a child theme function. A snippet plugin is simply the safest option because theme updates will not remove it.
A script with defer loads after the page content, so the effect is usually small. Measure before and after, and remove other widgets you do not use.
Yes. Many snippet plugins let you target pages or post types, or you can control the widget with open and close calls in your own code.
Clear your caches, check the page source for the script and make sure the agent id is correct. Look for a security or consent plugin that blocks outside scripts.
Askocto answers the repeat questions across chat, email and voice and hands the hard ones to your team.
Adding a chatbot to Wix takes one pasted script. Follow the steps to train your agent, add the code, test on desktop and mobile, and fix the usual problems.
Read articleConnecting an AI agent to your helpdesk and CRM is four decisions: what it reads, what it writes back, which actions it may take and how you prevent duplicates. Here is how to make each one.
Read articleSeven decisions to settle before you embed an AI chat widget: its job, placement, triggers, greetings, mobile behavior, speed and accessibility. No code, works on any site.
Read article