Skip to content

Integration

Add an AI chat widget to your WordPress site

Kit is an AI support agent that learns your business from your website and answers your visitors in chat. Putting it on WordPress takes one line of code, pasted once in a place your pages share.

Hire KitFree to try. No card needed.

First, two things in Kit

Kit learns your business from your website, and you check its answers before anyone else sees it. Once Kit is live (with a plan, or with Go live free when Kit offers it), open the install code from your dashboard: click Get the install code on the “Put Kit on your website” card if you see it (it carries your agent’s name), or Install code on your Overview. Then, in this order, before you go to WordPress:

  1. Under Add your website (or Change allowed websites), add your site and click Save allowed websites. Kit answers only on the websites you list, so use the address your visitors see, and include “www” if your site uses it.
  2. Click Copy snippet. Copying unlocks once a website is saved. It’s one line, with your own agent’s ID where this one says your-kit-id:
<script src="https://kit.ai/widget.js" data-bot="your-kit-id" defer></script>

Paste it once, site-wide

WordPress sites take code in different ways, depending on the theme and who set the site up. Use the one your site already has:

  • A header and footer code plugin. If your site already uses one, paste the snippet once in its site-wide footer box and save. No plugin yet, and a classic theme? If you can install plugins, add a general-purpose header and footer plugin under Plugins → Add New Plugin, then paste the snippet into its site-wide footer box.
  • A block theme’s footer. In the Site Editor (Appearance → Editor), open your site’s footer, add a Custom HTML block, paste the snippet and save. The change shows on every template that includes that footer, so open a post, a page and your homepage to check Kit is on each kind you want it on.
  • Not sure? Ask whoever runs your site which custom-code method it supports, or send them Kit’s instructions (below).

Paste it once. Two copies of the snippet would mean two chat buttons.

On WordPress.com, adding JavaScript needs a plan that allows plugins, with hosting features activated. WordPress.com’s code help explains both. A self-hosted WordPress site needs neither.

If the chat doesn’t show up

  • Use a Custom HTML block, not a Code block. A Code block shows code to your visitors as text; it doesn’t run it.
  • Check who saved it. WordPress keeps a script in a Custom HTML block only for users with the unfiltered_html capability. For anyone without it, such as a Contributor, WordPress strips the script tag out when the block is saved. Some hosts remove scripts too.
  • Check the address. The site in your browser has to match one of Kit’s allowed websites, “www” included.

WordPress explains the block in its Custom HTML documentation.

Check it, or hand it off

Open a page on your live site, not the editor, and look for the chat button. If the site was already open, reload it first. Ask it something a customer would ask and wait for the answer. Then go back to Kit and click Check for a visitor reply (it reads Check for a new visitor reply once Kit has a reply on file). Kit shows the latest reply on any of your allowed websites, so check that the website and the time match your test.

If someone else looks after your WordPress site, find Who looks after your website? next to the install code, choose Someone helps me with my website and click Copy installation instructions: the snippet, where it goes and how to test it, in one message. They won’t need access to your Kit account, and Kit doesn’t send anything for you.

Questions people ask

Do I need a Kit plugin for WordPress?

No. There’s no Kit plugin to install. Kit is one line of code that you paste once in a place your pages share, such as a footer code plugin you already use or your block theme’s footer.

Will Kit slow my WordPress site down?

The snippet uses defer: the browser downloads Kit’s script while it reads your page, and runs it only after your page’s HTML has been read, so the script doesn’t stop your page from being read.

Can I try Kit before it appears on my site?

Yes. You can try Kit privately on your own website’s questions, for free and without a card. It stays hidden on your site until you go live.

Get your line of code

Show Kit your website and check its answers. When you’re happy, copy your snippet and paste it into WordPress.

Free to try. No card needed.