What is the Floating Agent?
The small “Chat with Katie” bubble that sits fixed in the bottom-right corner of the screen, on top of whatever page a visitor is looking at. Clicking it opens a compact chat panel — open-ended questions, answered from Katie’s real knowledge base (see the Knowledge Management Guide for how that side works).
How it gets onto every page
Nobody adds the bubble to pages one at a time. It’s injected automatically, sitewide, through a single WPCode snippet:
-
WPCode → Snippet Manager → “Floating Agent”
(snippet ID
3125) is set to run in the Site-Wide Footer location — meaning WordPress automatically echoes it at the bottom of every single page load, with no manual placement needed anywhere. -
That snippet’s content pulls in
deploy_floating_agent.php, the file that actually builds and prints the bubble’s HTML/CSS/JS. - Before it renders anything at all, the very first thing that file does is check the current page’s URL against an exclusion list. If the current page matches, the file exits immediately — nothing is drawn, nothing loads.
Excluding a page — step by step
The exclusion list lives right at the top of deploy_floating_agent.php,
as a plain array of URL fragments:
$excluded_paths = array(
'/assessment/',
'/risk-analytics-biometric/',
'/admin-knowledge-manager/',
);
$current_path = $_SERVER['REQUEST_URI'];
foreach ($excluded_paths as $path) {
if (stripos($current_path, $path) !== false) {
return;
}
}
To add or remove a page, via WPCode (no file editing needed):
- Go to WPCode → Snippet Manager in the WordPress admin sidebar.
- Open the snippet titled “Floating Agent” (ID
3125, location: Site-Wide Footer). - Find the
$excluded_pathsarray near the very top of the code. -
To exclude a new page, add a line inside the array with the page’s URL path,
in quotes, ending with a comma — e.g.
'/my-page/',. - To stop excluding a page, delete its line from the array.
- Click Update to save the snippet.
stripos() checks whether the path appears anywhere in the
current URL, case-insensitively — it isn’t anchored to the whole path. So
'/assessment/' also excludes any URL that contains that text anywhere,
such as /assessment/some-sub-page/. Keep this in mind if you ever add
a short or generic-looking path — it may catch more pages than intended.
Pages currently excluded
| Path | Likely reason |
|---|---|
/assessment/ |
This page already has its own dedicated “Ask Katie” interface built in — the floating bubble would be a redundant second copy of the same conversation. |
/risk-analytics-biometric/ |
A data-heavy analytics page; the floating bubble likely isn’t wanted on top of charts/results here. |
/admin-knowledge-manager/ |
Internal admin tool for managing Katie’s own knowledge — not a customer-facing page, so the customer-facing chat bubble has no reason to appear. |
Reasons above are inferred from what each page does, not stored anywhere in code — worth confirming with whoever originally added each exclusion if you need certainty.
Files involved
agents/triage_agent/triage_backend.php; moved here
because the triage agent now has its own separate backend.
Worth verifying Unconfirmed
deploy_floating_agent.php loads its backend with:
require_once get_stylesheet_directory() . '/agents/floating_agent/backend_floating.php';
— but the backend file’s own header comment identifies itself as living at:
agents/floating_agent/floating_backend.php
backend_floating.php
vs. floating_backend.php — not just a formatting difference.
If the file on the server is genuinely only named floating_backend.php,
that require_once would fail outright. Worth a quick check next time
anyone is on the server (File Manager or SSH, in
agents/floating_agent/) to confirm which filename actually exists,
and to make sure both files aren’t quietly sitting there as accidental duplicates
of each other.