How to add a chatbot to your website (WordPress, Squarespace, Wix, Webflow, Shopify)
Last updated October 19, 2026 · Prices and features change, so check the linked sources before you buy.
<script> line so it loads on every page, ideally just before the closing </body> tag. The catch is your plan. Squarespace needs Core or higher for code injection. Wix needs a published site with a connected domain. WordPress.com needs a plugin-enabled plan. Webflow needs a paid Site plan or a paid Workspace.What you’re actually pasting
Your chatbot provider gives you a snippet that looks something like this:
<script src="https://your-chatbot-provider.example/widget.js" async></script>
The async part lets your page finish loading before the chat bubble appears. Add the snippet site-wide, not to one page, so the bubble follows visitors around your site. Put it in the footer or “before </body>” slot when your platform offers one. Webflow, for example, recommends script tags just before the closing body tag for page speed [4].
Platform by platform
WordPress (self-hosted, WordPress.org)
- Install a header-and-footer plugin. WPCode (formerly “Insert Headers and Footers”) is free and has over 3 million active installs [1].
- Open Code Snippets → Header & Footer.
- Paste the snippet into the Footer box and save.
- Clear your caching plugin’s cache if you use one, then load your site in a private window.
Avoid pasting into your theme’s footer.php. A theme update can wipe it out.
WordPress.com
JavaScript is only allowed on sites with a plugin-enabled plan and activated hosting features. Free sites can’t run third-party scripts [2]. Once you’re on one of those plans, install a header-and-footer plugin and follow the WordPress steps above. You can also paste the snippet into a Custom HTML block, but then the bubble only shows on that page [2].
Squarespace
- Check your plan. Code injection is available on Core, Plus, Advanced and some legacy plans, not on Basic [3].
- Open the Code Injection panel.
- Paste the snippet into the Footer field. Squarespace injects footer code “before the closing </body> tag on every page” [3].
- Click Save. Checkout pages never run custom code [3], so the bubble won’t appear there. That’s normal.
Wix
- Make sure your site is published and has a connected domain. Wix requires this before you can add custom code [5].
- Go to Settings in your site’s dashboard, then Custom Code under Development & integrations [5].
- Click + Add Custom Code, paste the snippet and give it a name like “Chatbot”.
- Under Add Code to Pages choose All pages and to load it on each page your visitor opens. Under Place Code in choose Body – end, then click Apply [5].
Wix added stricter frontend security for custom code in December 2025, and some older snippets stopped working [5]. If the bubble doesn’t appear, ask your chatbot provider whether their widget has been updated for it.
Webflow
- Custom code needs a Core, Growth, Agency or Freelancer Workspace, or an active Site plan [4].
- Go to Site settings → Custom code.
- Paste the snippet into Footer code and click Save changes [4].
- Publish the site. Custom code shows in preview but doesn’t go live until you publish [4].
Shopify
- First check whether your chatbot has a Shopify app. An app (or “app embed”) is safer than editing code. Shopify advises editing theme code only when an app or the theme editor can’t do the job [6].
- If you do edit code, duplicate your theme first as a backup [6].
- Go to Online Store, open the … menu on your theme and choose Edit code [6].
- Open
layout/theme.liquid, find</body>, paste the snippet on the line above it and save.
Two Shopify catches: you can only edit code on a theme you’ve bought, not a trial of a paid theme. And code edits can be lost when the theme updates [6]. Note where you put the snippet.
Test it in five minutes
- Open your site in a private or incognito window, on desktop and on your phone.
- Check that the bubble doesn’t cover your own “Book now” or “Call” buttons on mobile.
- Ask the bot three real customer questions and one it shouldn’t know. It should say it doesn’t know and offer to take a message, not guess. (Here’s why that matters.)
- Leave a test message and confirm it reaches the inbox you expect.
- If you use a cookie banner or consent tool, check the bot still loads, or is held back, the way your privacy settings say it should.
If the bubble doesn’t show up
- Nothing at all: check your plan allows custom code (above), that you saved and published, and clear any cache.
- Works on one page only: you added it to a single page or block instead of site-wide.
- Shows twice: the snippet was pasted in two places (for example, the header and footer).
- Blocked by security settings: sites with a strict Content Security Policy must allow the chatbot’s domain. Ask whoever manages your site.
FAQ
How do I add a chatbot to my website?
Copy the script snippet your chatbot provider gives you and add it site-wide, ideally just before the closing body tag. On WordPress use a header-and-footer plugin such as WPCode, on Squarespace use Code Injection > Footer, on Wix use Settings > Custom Code (Body – end), on Webflow use Site settings > Custom code > Footer code, and on Shopify use the chatbot’s app or the theme.liquid file.
Can I add a chatbot to Squarespace on the Basic plan?
Not with code injection. Squarespace says code injection is available on the Core, Plus, Advanced and some legacy plans.
Can I add a chatbot to a free WordPress.com site?
Not a third-party script chatbot. WordPress.com only allows JavaScript on sites with a plugin-enabled plan and activated hosting features.
Why is my chatbot not showing on Wix?
Wix requires the site to be published with a connected domain before custom code runs. Wix also tightened frontend security for custom code in December 2025, which blocked some older snippets until providers updated them.
Does a chatbot script slow down my website?
A well-built widget loads asynchronously, so your page finishes loading first. Put it before the closing body tag and test your page speed before and after.
Sources
- WordPress.org: WPCode – Insert Headers and Footers plugin
- WordPress.com Support: Add code to your site (reviewed Oct 5, 2026)
- Squarespace Help: Customize parts of your site with code injection (updated Sep 16, 2026)
- Webflow Help: Custom code in head and body tags (updated Sep 2, 2026)
- Wix Help: Embedding custom code on your site
- Shopify Help: Editing theme code