← All articles
Solutions4 min read·7 May 2025

How to Add a Chat Widget to Any Website

WordPress, Squarespace, Wix, Webflow — it's one line of code regardless of what your site is built on.

Whatever your website is built on — WordPress, Squarespace, Wix, Webflow, or something custom — adding a chat widget is a one-time copy-paste job. There's no plugin to install, no developer needed, and no code to write. You paste one line into your site's footer and you're done.

Here's how to do it on the most common platforms.

WordPress

The easiest way to add a script tag to WordPress is using a header/footer plugin. These avoid editing theme files directly, which means your code won't disappear when the theme updates.

If you'd rather edit theme files directly: go to Appearance → Theme File Editor → footer.php and paste the script just before the </body> tag. Note that this will need to be re-added if you switch themes.

Squarespace

Note: Code Injection is only available on Squarespace Business plans and above.

Wix

Webflow

You can also add it to a specific page only: open the page in the Designer, go to Page Settings → Custom Code → Before </body> tag.

Custom HTML sites

If your site is hand-coded HTML, paste the embed script just before the closing </body> tag in every page you want the widget to appear on, or in your shared footer template if you have one.

What happens after you paste it

The widget loads automatically on every page of your site. Visitors will see a small chat button in the corner (usually bottom-right). When they click it, the chat window opens and your AI receptionist starts the conversation.

You don't need to do anything else for the widget to work. Changes to your knowledge base or settings update instantly — there's nothing to reinstall or republish on your website side.

A note on domain restriction

Most AI chat providers — including Maggie — let you restrict your widget to only load on your domain. This stops anyone from copying your embed code and pasting it on their site. It's worth enabling this in your settings once you've confirmed the widget is working correctly.

Ready to stop missing enquiries?

Set up takes 10 minutes. 14-day free trial, no card needed.

Start your free trial →