How to Add a Chatbot to WordPress, With or Without a Plugin

Mike GreviouskDecember 4, 20265 min read

Three ways to add a chatbot to WordPress

Three ways

  • 1A chat plugin
  • 2A vendor snippet in the header
  • 3Site Agent via the tracker

The short answer

To add a chatbot to WordPress, install its plugin or paste its script into the header with a plugin such as WPCode. Site Agent goes in the second way: Venbit's tracker line in the Header box, then one switch in Venbit. If a caching plugin delays JavaScript, exclude the script.

What to know

  • Put scripts in a header plugin like WPCode, not in theme files, which an update overwrites.
  • WP Rocket, LiteSpeed Cache and FlyingPress can hold scripts until the visitor moves. Exclude the chatbot's script and clear the cache.
  • On WordPress.com, plugins and header code need a paid plan: Personal or above, as listed on December 4, 2026.

Work through it

Going live with a chatbot on WordPress

Tick each step as you finish it. Your ticks stay in this browser, so you can stop and come back.

0 of 13 done

Before you add it
Add it
Test it

Three ways to put a chatbot on WordPress

  • A chat plugin from the directory

    Tidio's plugin lists 70,000+ active installations and works through a Tidio account. AI Engine lists 90,000+ and runs on your own API keys from an AI provider.

  • A vendor's snippet in your header

    Chat services without a plugin hand you a script tag for the head of every page, best pasted with a header and footer plugin.

  • Site Agent via the tracker

    It loads through the tracker line Venbit's analytics uses: one line in the header, then one switch in Venbit.

The real choice is who answers (plugin figures and quotes as listed on wordpress.org, December 4, 2026):

  • Tidio "lets you talk to your website visitors in real time", with its Lyro AI agent on top: good if someone is free to type replies.
  • AI Engine says "You need your own API keys", so you pay the AI providers directly.
  • Site Agent answers on its own from your pages and sends the chat to your Venbit Inbox as a lead.

Why the snippet goes in a plugin, not your theme

Code in a theme's own files is lost when the theme updates or you switch themes. Of a function added to functions.php, WordPress's theme handbook says: "the next time your theme is updated, your function will disappear!" WPCode keeps the line outside the theme; it's the plugin WordPress.com's help names for header code, with 3+ million active installations.

Add Site Agent to WordPress, step by step

Site Agent shows on a website from the Core plan, $99 a month per website with 200 replies a month; on Base, $39, it stays in Live View. The 14-day Full Access trial needs no card, and every plan includes Venbit's analytics, lead Inbox and rankings, so the price isn't for the chatbot alone. On Squarespace or Wix instead? See the Squarespace and Wix guides.

  1. 1

    Create the agent

    In Venbit open Site Agent and press Create Site Agent. It reads up to 25 pages of your site into its Knowledge Base in under five minutes.

  2. 2

    Test it in Live View

    Ask your five most common questions, in your customers' words. Fix wrong answers under Knowledge Base with Write or paste text, then ask again.

  3. 3

    Copy the tracker line

    Open Settings, then Tracking, and press Copy the line. If Venbit's analytics already runs on your site, the line is in place: skip to step 6.

  4. 4

    Install WPCode

    In WordPress open Plugins, then Add New Plugin. Search for WPCode, press Install Now, then Activate.

  5. 5

    Paste the line in the Header box

    Open Code Snippets, then Header & Footer. Paste the line into Header exactly as copied and press Save Changes.

  6. 6

    Exclude it from delayed JavaScript

    If you run WP Rocket, FlyingPress or LiteSpeed Cache, exclude vnbt.app/m.js from delayed JavaScript and clear the cache, as shown below.

  7. 7

    Turn on Show on your website

    In Venbit open Site Agent, then Agent Configuration, and turn it on. The line under it should read "The bot shows on every page where the Venbit tracker runs."

9:41
Site Agent
Venbit
Live ViewKnowledgeGoalsSettings
Show on your website
Off. It shows nowhere but Live View.
Appearance
Instructions
Greeting
Voice
Advanced
venbit
Ask a question…
Show on your website switched on in the Venbit iPhone app, with the chat bar in Live View.

Changes to the agent then show on the next page a visitor opens, with nothing to republish in WordPress.

Caching plugins that hold scripts back

This is the WordPress problem most likely to make a chatbot look broken. WP Rocket's Delay JavaScript execution holds scripts back "until there is a user interaction": a mouse movement, a touch, a scroll or a key press. LiteSpeed Cache's Delayed mode "runs the JS only after detecting user activity", and FlyingPress's Load after interaction mode does the same.

The tracker line waits too, so a visitor who reads without scrolling never sees the chat bar, and quick visits go uncounted. Exclude the script:

  • WP Rocket: add vnbt.app/m.js to Excluded JavaScript Files, under Page Optimization, then JavaScript & CSS.
  • LiteSpeed Cache: add it to JS Deferred/Delayed Excludes, on the Page Optimization Tuning tab. One per line, no wildcards.
  • FlyingPress: add it as an exclusion keyword for Delay All JavaScript. A partial keyword matches; wildcards aren't supported.

Then clear the cache. Plugins that combine scripts can also strip attributes from the tag; Install the tracker has a fallback for that.

Test it on the live site and on your phone

Live View proves what the agent says, not that it's on your site:

  1. 01Open your site in a private window. The bar should appear at the bottom a moment after it loads, without scrolling.
  2. 02Ask a question a customer would ask, then ask for a quote and check it asks for the details you set in Goals.
  3. 03Repeat on your phone, watching the bottom of the screen for a cookie banner, a sticky call button or an old chat plugin.
  4. 04In Venbit, Settings, then Tracking, should read Working once your visit arrives.

If something covers the bar, change Position (Left, Center or Right) under Appearance.

venbit.com/dashboard
Layout
Venbit Voice Widget
Talk to an agent
Venbit Chat Bar
Ask a question…
Widget
Position
Along the bottom of the page
LeftCenterRight
Panel title
The heading of the chat panel
Chat with us0/40
Appearance: the chat bar's Position moves to Center along the bottom of the page.

Give it what it needs to answer

The agent answers only from its Knowledge Base, never the open internet. On a site with years of posts, the first 25-page reading may pick up an old blog post and miss a service page, so check My Documents:

  • Delete anything that shouldn't shape answers, such as a post with last year's prices.
  • Add missed pages with Scan website or Add page links.
  • Upload files for price lists or warranty terms: PDF, Word, Excel, CSV or text, up to 4 MB each.
  • Use Write or paste text for anything the site never says, such as hours or the towns you cover.

It won't re-read your site on its own: after you update a page, delete its row and add it again. Pages behind a login can't be read, so paste that information as text.

venbit.com/dashboard
My Documents
8 web pages
Add
Upload filesPDF, Word, Excel, CSV or text, 4 MB each
Write or paste textHours, policies or answers for visitors
Scan websiteFind your pages and pick which to add
Add page linksPaste the addresses of pages to add
NameCharactersAdded
Seovenbit.com/seo · Importing12,396Oct 18
Google Ads Managementvenbit.com/google-ads-management · Importing5,253Oct 18
Products/Website Checkupvenbit.com/products/website-checkup · Importing3,769Oct 18
venbit.comvenbit.com · Importing9,884Oct 18
Contactvenbit.com/contact · Importing689Oct 18
Web Designvenbit.com/web-design · Importing9,098Oct 18
Services/Web Maintenancevenbit.com/services/web-maintenance · Importing8,408Oct 18
Services/Logo Designvenbit.com/services/logo-design · Importing7,578Oct 18
About Usvenbit.com/about-us · Importing3,180Oct 18
Servicesvenbit.com/services · Importing1,213Oct 18
Productsvenbit.com/products · Importing5,631Oct 18
The Knowledge Base: a website scan adds pages, each marked Importing until it lands.

Then set what it asks for. On Venbit's client websites:

1 in 6
conversations ended with a phone number or an email
82%
of those included a phone number
49%
started outside 8 AM to 5 PM on weekdays
Venbit Site Agent conversations on client websites, mostly home-service companies, October 18 to December 4, 2026. Conversations where a visitor asked at least one question; test chats and Venbit's own site excluded.

Keep Phone switched on in Goals, and test what someone would ask after hours: your hours, emergency work, whether you cover their town.

If it doesn't show up

Start with the grey line under Show on your website in Agent Configuration, which names most of the causes. The rest are WordPress-specific:

What you seeLikely cause on WordPressFix
"The tracker has not reported from this website yet"The line isn't in the head of your pages, or WPCode's change was never savedPaste it in the Header box and press Save Changes
The bar appears only after you scroll or move the mouseDelayed JavaScript in WP Rocket, LiteSpeed Cache or FlyingPressExclude vnbt.app/m.js and clear the cache
"The tracker last reported on" a past dateThe line lived in the old theme's files and a redesign or theme switch removed itPut it back in WPCode, outside the theme
Missing on booking or checkout pagesThose pages run on another system without the tracker lineExpected. The agent only appears where the line runs
Two chat buttons in the same cornerAn older chat plugin is still activeDeactivate it, or move the agent under Appearance
Visitors told "I can't answer more questions right now"The month's replies are used upDetails visitors leave still reach you. Answers return next month, or on a larger plan

If your site sends a Content Security Policy, see Content Security Policy for what to allow. For anything else, see Troubleshooting or Settings, Support in Venbit.

When Site Agent is the wrong pick

It answers your website, not your phone line, and runs one agent per website. It knows only what you gave it, so prices that change daily and never reach the site get vague answers. If you want staff typing live replies all day, a live chat plugin fits better. Live chat, AI chat or both compares them.

Put Site Agent on your WordPress site

One line in WPCode's Header box and one switch. It answers visitors from your own pages and sends their details to your Inbox. Free for 14 days, no card needed.

Questions & Answers

  • Not always: a script-only chatbot just needs its line in the head of every page, though a header plugin such as WPCode is the safe place for it, since a line in the theme's files disappears when the theme updates. Some chatbot companies, such as Tidio, offer their own plugin instead.

  • Yes, on a paid plan: as listed on December 4, 2026, WordPress.com allows plugins and code in the header on its Personal, Premium, Business and Commerce plans. A free WordPress.com site has to upgrade first.

  • It depends on who should answer: a live chat plugin such as Tidio suits a business with someone free to type replies, and AI Engine suits someone who wants to run the chatbot on their own AI provider account. Site Agent answers from your own pages by itself and sends visitors' details to your Inbox as leads.

  • A caching plugin such as WP Rocket, LiteSpeed Cache or FlyingPress is most likely delaying JavaScript until the visitor interacts. Add the chatbot's script (for Site Agent, vnbt.app/m.js) to the plugin's delayed JavaScript exclusions and clear the cache.

  • It shows on a website from the Core plan, $99 a month per website with 200 replies a month, or Full Access, $199 with 2,500; both include the rest of Venbit Intelligence. The 14-day Full Access trial needs no card.

More on Site Agent

All Site Agent articles