Before you start
- Drupal 8, 9, 10 or 11. The module's current release, 3.0.1, supports all four.
- Someone who can install modules. On most Drupal sites that's done with Composer, by whoever looks after the site.
- Your code from your assistant's Widget page.
Steps to add your Drupal chatbot
- Sign in, open your assistant's Widget page and copy the one line of code shown there. It starts with <script and ends with </script>.
- Install the Header and Footer Scripts module (drupal/header_and_footer_scripts with Composer), then enable it on the Extend page.
- Go to Configuration, then Development, then Header Footer Scripts, and open the Footer Scripts tab.
- Paste your code into the Footer Scripts box. The module adds it just before the closing </body> tag.
- Click Save configuration.
- Go to Configuration, then Development, then Performance, and click Clear all caches, so pages Drupal has already cached pick up the change.
- Open your website in a new tab and look for the chat bubble in the bottom-right corner, or bottom-left if you've moved it in Settings. Your Widget page shows "Live on your site" once it has been seen there.
Platform steps checked on November 13, 2026 against Drupal.org: Header and Footer Scripts
Good to know
- We read the module's code: it rebuilds each script tag from what you paste and keeps every part of the line, including the data-business-id that tells the chat whose assistant to load.
- Don't add HTML comments to the box. The module's page says they aren't supported.
- Developers can skip the module and add the line before </body> in a custom theme or sub-theme, so core and contributed theme updates don't overwrite it.
- The chat only shows on your own domain and any you add under "Where it can appear" on your Widget page. If you test on a staging copy, add its address there.
Can't edit your website?
Every assistant has its own chat page. Link to it from your website's menu, your Google Business Profile, social media or email signature. Or use "Email this to my web person" on your Widget page to send the code to whoever runs your site.
Questions
Is there a Drupal chatbot module?
Drupal's AI modules can build a chatbot inside your site, connected to an AI provider you set up yourself. Ours runs on our side, answers from your website and your corrections, and only needs its one line added to your pages, which is what the module above does.
Does it work on Drupal 10 and 11?
Yes. The Header and Footer Scripts module's current release lists Drupal 8, 9, 10 and 11, and the chat itself works on any page that loads the line.
Can I add the chatbot to Drupal without a module?
Yes, if you or your developer edit your theme. Add the line just before </body> in your own theme or a sub-theme, never in a contributed theme an update will replace.