Chatclient.ai
Embeds the chatclient.ai chat widget on your site's public pages, keeps it off login and admin pages, and lets you turn it off without a code deployment.
The vendor's own instructions are "paste this script tag into your site." This module does that for you, but it also handles the three things the pasted snippet gets wrong: it keeps a third-party script off pages that carry a login form or a session, it lets an administrator pull the widget the moment the vendor breaks it, and it repairs the accessibility problems in the widget's injected markup.
Features
- Widget on public pages only. The embed script and its
window.chatBotConfigare attached to every page an anonymous visitor sees. The widget is never attached on/user/*, on/admin*, or on any page viewed by an authenticated user. The embed is third-party JavaScript with full DOM access, so a compromise at the vendor should never reach your login form or an editor's session. These exclusions are hardcoded and cannot be overridden from the UI. - On/off switch without a deployment. A checkbox at Configuration → Web services → ChatClient.ai removes the widget, its configuration and its accessibility patch from every page. Saving the form invalidates the page cache through the config cache tag, so the change takes effect at once, on tag-aware CDNs as well.
- Chatbot ID in configuration. The ID from your chatclient.ai dashboard is stored in
chatclient_ai.settingsrather than in a template. An empty ID also hides the widget. - Path exclusions with wildcards. A textarea accepts one path pattern per line using the same syntax as block visibility's Pages field:
*matches any run of characters,<front>is the front page, and each pattern is checked against both the alias and the system path./careers,/node/123,/podcasts/*and/*/applyall do what they look like. Patterns only add to the hardcoded exclusions; they cannot put the widget on a login, admin or authenticated page. - Accessibility fixes for the launcher. The embed injects its launcher as a bare
<div>wrapping an<img>with noalt, and gives its chat<iframe>notitle. Keyboard users cannot reach it and screen readers announce an unnamed image. The module's JavaScript watches for the widget as it is injected and turns the launcher and mobile close control into labelled, keyboard-operable buttons, marks the icons decorative, keepsaria-expandedin step with the panel, and titles the iframe. The embed exposes no settings for any of this, so the fixes are applied to its markup directly. - Drush-friendly. Everything is plain configuration:
drush cset chatclient_ai.settings enabled 0 -y drush cset chatclient_ai.settings excluded_paths $'/careers\n/podcasts/*' -y
Post-Installation
Go to Configuration → Web services → ChatClient.ai (/admin/config/services/chatclient-ai), enter your chatbot ID, and save. The widget appears on public pages immediately; no cache clear is needed. The administer chatclient_ai permission is restricted and grants access to the settings form.
If your deployment imports configuration, add chatclient_ai.settings to Config Ignore or the equivalent. Otherwise drush cim resets the switch on every deploy, and the whole point of turning a broken widget off without a deployment is lost.
If the module is first installed by a config import, the import finishes with no chatclient_ai.settings at all. Core does not read a module's config/install during a sync, and Config Ignore's protection is computed before the module exists. Save the settings form once after the import, or create the config object from a hook_deploy_NAME() that runs after the import.
Additional Requirements
- Drupal 10.3 or later, or Drupal 11.
- A chatclient.ai account and a chatbot ID.
No contributed module dependencies.
Recommended modules/libraries
- Config Ignore, so the on/off switch survives configuration imports.
Similar projects
Generic script-injection modules such as Asset Injector can paste the embed snippet, but they know nothing about which pages should not carry it, and they do nothing about the widget's accessibility.
Supporting this Module
Developed and maintained by Lullabot.
Community Documentation
See the README in the project repository.
Depends on
Dependencies of the latest stable release
No dependencies recorded for this project.
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
Activity
Releases
| Version | Type | Core | Notes | Release date | |
|---|---|---|---|---|---|
| 1.0.x-dev | Dev | 10–11 | First development release. Embeds the chatclient.ai widget on public pages only, with an admin on/off switch, wildcard path exclusions, configurable labels and accessibility fixes for the vendor launcher. Drupal 10.3+ and 11. | Sep 24, 2026 |