Skip to content

WordPress install guide

Add an AI chatbot to your WordPress site

To add AssistBot to WordPress, paste the script tag before </body> using a header and footer code plugin such as WPCode (the Footer box), or in your theme’s footer.php just above </body>. The same steps work on WooCommerce stores.

Steps

How to add AssistBot to WordPress

It takes one snippet, pasted in the Footer box of a header and footer code plugin, or footer.php just above </body>. You copy it from the Install page of your agent in the AssistBot dashboard.

HTML
<!-- AssistBot widget -->
<script>
(function () {
  var s = document.createElement('script');
  s.src = 'https://www.assistbot.app/widget/assistbot.js';
  s.async = true;
  s.onload = function () {
    AssistBot.init({ agentId: 'YOUR_AGENT_ID' });
  };
  document.head.appendChild(s);
})();
</script>
An example of the snippet. The one you copy from the dashboard has your own agent ID in place of YOUR_AGENT_ID.
  1. 01

    Create an agent and add your content

    Sign up, create an agent and, under Knowledge, crawl your site and pick the pages it should answer from. Add PDF, DOCX or TXT files, pasted text or Q&A pairs for anything that is not on a page.

  2. 02

    Copy the script tag

    In the AssistBot dashboard, open the agent, go to Install and click Copy snippet. The snippet already contains your agent ID.

  3. 03

    Install a header and footer code plugin

    In WordPress admin, go to Plugins > Add New, search for WPCode (or another header and footer code plugin), then install and activate it.

  4. 04

    Paste the snippet into the footer

    Go to Code Snippets > Header & Footer, paste the snippet into the Footer box and click Save Changes.

  5. 05

    Clear your cache

    If you use a caching or optimisation plugin, clear its cache so visitors get the updated pages.

  6. 06

    Check that it is working

    Open your site in a new browser tab and look for the chat launcher in the bottom corner. Then go back to Install in AssistBot and click Check again: the status changes from Not detected to Installed and shows the site and when the widget was last seen.

Good to know

Before you start

  • There is no AssistBot WordPress plugin. Any plugin that adds code to the site footer works, because the install is one script tag.
  • Without a plugin, on a classic theme: go to Appearance > Theme File Editor, open footer.php and paste the snippet just above </body>. Use a child theme, or a theme update will remove it.
  • Block themes have no footer.php, so use the plugin method.
  • On WordPress.com, installing plugins needs a plan that allows plugins.
  • Script optimisation plugins can delay or combine scripts. If the launcher does not appear, clear the cache and exclude the snippet from optimisation.

How to check it is working

The Install page in the dashboard checks whether the widget has loaded on a site in the last 7 days. After you publish, open your site once, then click Check again. It shows Installed, the domain and the time the widget was last seen. You can also send a test message from your own site and find it in the Inbox.

FAQ

WordPress questions

Is there an AssistBot WordPress plugin?

No. You paste the AssistBot script tag into your site footer, using any header and footer code plugin or your theme’s footer.php. Nothing else needs to be installed.

Does it work with WooCommerce?

Yes. A WooCommerce store is a WordPress site, so the install is the same. The agent answers from the product, shipping and returns pages you pick. For order status, connect an endpoint that returns it as a custom API action.

Why can’t I see the chat widget after adding the code?

Usually a cache. Clear your caching plugin and any CDN cache, then reload in a private window. Also check that the snippet is in the Footer box and that the change was saved.

How do I know the chatbot is installed correctly?

Open your live site in a browser so the widget loads once, then open the agent’s Install page in AssistBot and click Check again. It shows Installed, the domain it was seen on, the time it was last seen and how many visitor sessions it counted in the last 7 days. If it still says Not detected, the snippet is not on the published page yet.

How much does it cost?

The free plan includes 150 AI replies a month for 1 agent, with no card needed. Startup is $24 a month for 5,000 messages and Growth is $49 a month for 20,000 messages. Installing on any platform is the same on every plan.

Put an AI chatbot on your WordPress site

The free plan includes 150 AI replies a month and 1 agent. No card needed.