How to add the AISkillHub chat to Drupal
Add Live chat or Global Room to a Drupal 10 or 11 site through your theme's html template, or with the Asset Injector module.
Before you start, create your widget and verify your domain. The overview guide explains both. Then copy your snippet from the widget's Install tab.
Drupal's text editor removes script tags from content, so do not paste the snippet into a block body. Use one of these instead.
Option 1: your theme's html template (recommended)
Use a sub-theme you control, so updates to a contributed theme do not remove it.
- Copy
html.html.twiginto your sub-theme'stemplatesfolder if it is not there yet. Core's version is incore/modules/system/templates/, or in your base theme. - Paste your snippet just above
{{ page_bottom }}, near the end of the body. - Clear the cache: Configuration → Development → Performance → Clear all caches, or run
drush cr.
Verifying with the meta tag? In the same template, paste the aiskillhub-verification meta tag inside the <head> section, clear the cache, then choose Verify in AISkillHub. DNS verification avoids template changes entirely.
Option 2: the Asset Injector module (no template edits)
- Install and enable the contributed Asset Injector module.
- Go to Configuration → Development → Asset Injector → JS Injector and add a new injector.
- Paste this code, with your own key, and save:
var s = document.createElement('script');
s.src = 'https://app.aiskillhub.dev/widget.js';
s.async = true;
s.setAttribute('data-widget', 'wgt_your_widget_key');
document.body.appendChild(s);
Leave the page conditions empty to load the chat on every page, or limit it to the pages you choose.
After you add it
If you use a reverse proxy cache such as Varnish or a CDN, purge it. Then open your site in a private window. Still stuck? See if the chat does not show up.