Help · Add the chat to your site

Add the chat to WordPress

Updated

The chat widget is one line of code. Here's where it goes on a WordPress site, so the chat button appears in the corner of every page.

For more detail, other options and cookie consent, see our guide How to add a custom AI chatbot to your WordPress website.

1. Copy the code

Open your project and go to Settings. Under Widget integration code, choose Copy snippet. Use the code from your own dashboard: it contains your project's ID.

<script src="https://…/pixe-widget.js" data-project-id="…" data-api="…" async></script>

Settings → Widget integration code, with the snippet and its copy button

2. Paste it into WordPress

With a plugin (recommended):

  1. Go to Plugins → Add New, search for a header and footer code plugin (WPCode is a popular free one), install and activate it.
  2. Open its settings, paste the code into the Footer box and save.

Without a plugin, on a block theme: go to Appearance → Editor → Patterns (or Template Parts), open your Footer, add a Custom HTML block, paste the code and save.

For developers: print the code from a wp_footer action in your child theme's functions.php, never in the parent theme.

3. Check your domains

The widget only runs on your project's allowed domains, in Settings. www. counts as the same domain. Add a staging site's address if you want the chat there too.

The chat button doesn't appear

  • Clear your caching plugin's cache (and your host's), then reload.
  • If a plugin delays, combines or minifies JavaScript, exclude pixe-widget.js in its settings.
  • Check the page's domain is one of the project's allowed domains in Settings.
  • Check the widget isn't turned off in Chat → Widget.
  • Open the browser's console (right-click, Inspect, Console): the chat leaves a short message there when it doesn't load.

Let your website answer for you.

We set up your assistant and site with you, usually within a day. Then your first 2 weeks are free, with real visitors.