CMS · Developer setup

AI live chat for Drupal 10 and 11

The widget is two script tags, so the most reliable Drupal install is your theme's html.html.twig: paste the snippet before </body>, clear the caches, and every page gets the chat.

Card required · Cancel before day 15 and pay nothing

Last reviewed 2026-10-23

Replyze on Drupal

4 steps · Developer setup

  1. 1Copy html.html.twig into your custom theme's templates folder, from the base theme it extends or from core/modules/system/templates (skip this if your theme already has one).
  2. 2Paste the snippet right before the closing </body> tag.
  3. 3Deploy the theme and clear the caches (Configuration → Development → Performance → Clear all caches, or drush cr).
  4. 4Reload a page of your site and check that the chat button appears.
<script>
  window.ReplyzeConfig = {
    token: 'wgt_YOUR_TOKEN_HERE',
    apiUrl: 'https://client.replyze.chat'
  };
</script>
<script src="https://cdn.replyze.chat/widget.js" async></script>

Why Replyze for Drupal

  • No contrib module needed: the snippet goes in your theme template.

  • Works on Drupal 10 and 11, with a custom theme or sub-theme you control.

  • The script loads asynchronously, so it doesn't block your page.

  • Prefer the admin UI? A custom block with a text format that keeps script tags works too.

Install

Add Replyze to Drupal

Paste the snippet before </body> in your theme's html.html.twig, or into a block with a text format that keeps script tags.

  1. 1

    Copy html.html.twig into your custom theme's templates folder, from the base theme it extends or from core/modules/system/templates (skip this if your theme already has one).

  2. 2

    Paste the snippet right before the closing </body> tag.

  3. 3

    Deploy the theme and clear the caches (Configuration → Development → Performance → Clear all caches, or drush cr).

  4. 4

    Reload a page of your site and check that the chat button appears.

Snippet to paste

<script>
  window.ReplyzeConfig = {
    token: 'wgt_YOUR_TOKEN_HERE',
    apiUrl: 'https://client.replyze.chat'
  };
</script>
<script src="https://cdn.replyze.chat/widget.js" async></script>

Replace wgt_YOUR_TOKEN_HERE with your widget token, or copy the snippet with your token already in it from Settings → Chat Widget → Install in your Replyze dashboard.

In practice

How Replyze fits into Drupal

The Replyze snippet is an inline config script plus an external script tag, and your theme's html.html.twig takes both as they are. Copy the template into your custom theme or sub-theme, paste the snippet just before </body>, deploy, and clear the caches.

If you can't change the theme, use a custom block. Drupal's CKEditor 5 removes <script> tags, so create a text format with no editor and no HTML filtering, limit it to administrators, use it for the block body, paste the snippet, and place the block in a region shown on every page, such as the footer.

The Asset Injector module's JS injector takes plain JavaScript without <script> tags. That holds the config line, but not the external widget script, so the template or a block is simpler for this snippet.

What visitors on Drupal get

AI first, your team when it matters

  • Answers from your own help articles

    The AI replies in the visitor's language from the articles you publish and the answers your team teaches it. If the answer isn't there, it says so instead of guessing.

  • A person when it matters

    Visitors can ask for a person at any time, and topics your industry setup marks for the team, such as refunds and complaints, are handed over too. The teammate replies in the same chat, with the whole conversation in front of them.

  • Chat, email and messaging in one inbox

    Web chat on every plan. Email, WhatsApp and Telegram on Pro and Business, with Messenger and Instagram in beta, all in one shared inbox.

See every feature

FAQ

Drupal + Replyze, answered

Yes. Create a text format with no editor and no HTML filtering (limited to administrators), use it for a custom block, paste the snippet and place the block in a site-wide region such as the footer. CKEditor would strip the script tags, which is why the format needs no editor.

Its JS injector takes JavaScript without <script> tags, so you would have to rewrite the snippet to load cdn.replyze.chat/widget.js yourself. The theme template or a custom block takes the snippet as it is.

No. The snippet in your theme or a block does the job.

Get your Drupal chat ready for customers

Once the widget is installed, give it useful answers and connect it to the people who will reply. These examples cover what to publish, where to test the chat and how to handle the first enquiries from your Drupal site.

Read more: Get your Drupal chat ready for customers

What will visitors ask on your Drupal site?

“Who should I contact about this service?” is one question to try. It is the kind of detail a visitor may want while reading a page, before sending a message or making a purchase. Start with the questions your team hears most often about services, department contacts and enquiry requirements. Write the answer in a Replyze help article, using the same terms and conditions customers see on the website. Include the next step and a useful link when the customer needs another page.

Open the page where that question is likely to come up and ask it in your own words. Then ask a follow-up: “What if my situation is different?” Read both replies and request a person. This gives you a first check of the answer and the connection to your team before you invite customers to use chat.

A visitor on Drupal can ask a question while reading the page and continue with your team.
A visitor on Drupal can ask a question while reading the page and continue with your team.

Before and after adding chat to Drupal

Before: someone looking for services, department contacts and enquiry requirements may search the navigation, open a contact form and wait for an email. A clear website already answers many of these questions, so look for the points where people still get stuck. Your last few customer messages can show which explanation is missing or hard to find.

After: the visitor asks in the widget and receives an answer from the articles you have published. If the question concerns their own order, appointment or account, the team can continue in the same conversation. For example, a general policy question can lead into “Can you check my request?” The first answer stays visible when a colleague takes over, along with the details the customer has already shared.

Example contact journey: a Drupal visitor asks on the page and the team can continue the same chat.
Example contact journey: a Drupal visitor asks on the page and the team can continue the same chat.

Which help articles should you prepare first?

Create a short article for each of your main topics: services, department contacts and enquiry requirements. Explain the usual answer, the conditions that change it and the contact route for an individual request. Use your current website information as the starting point. The widget connects your site to Replyze; add the information you want the assistant to use in the knowledge base as a separate setup step.

If those answers already live in a document, Write with AI can prepare draft articles for you to check. Read the dates, amounts and exceptions carefully before publishing. Remove old versions that disagree with the new answer. When you change a policy on your Drupal site, update the corresponding article too so customers get the same explanation in both places.

Prepare help articles about services, department contacts and enquiry requirements before opening the chat to customers.
Prepare help articles about services, department contacts and enquiry requirements before opening the chat to customers.

Where should you add the Drupal snippet?

Follow the Drupal installation method above and check that the intended theme and cache refresh include the changed code. Start with the first installation step above: Copy html.html.twig into your custom theme's templates folder, from the base theme it extends or from core/modules/system/templates (skip this if your theme already has one). Use the snippet from the Replyze workspace that belongs to this website and follow the remaining platform steps. The workspace setting determines where the messages arrive, so check it before publishing, especially if you manage several brands or client sites.

Keep the snippet in one installation location. If another person previously added chat through a theme, a custom-code setting or a tag manager, locate that copy before adding a new one. Two installations can make troubleshooting confusing. Tell the person maintaining the site where you placed it, so the next theme update or redesign includes the same check.

Use the Drupal installation steps and the snippet for this website’s Replyze workspace.
Use the Drupal installation steps and the snippet for this website’s Replyze workspace.

What happens when a visitor needs a person?

Try a follow-up that needs somebody to check an individual request: “Can you change this for me?” The chat should explain how to reach the team and keep the conversation available for the person who responds. The website installation provides chat; account changes, order checks and booking confirmations still use the business systems and people responsible for them.

Ask directly for a teammate as well. Open the shared inbox and read the conversation from the receiving person’s side. Can they see what the customer wants and what has already been answered? Set the opening hours and contact instructions your team can actually support. When nobody is available, the customer needs a way to leave a contact detail and a clear expectation for the reply.

A teammate can continue the Drupal conversation with the earlier messages available.
A teammate can continue the Drupal conversation with the earlier messages available.

Should chat replace your contact form?

Keep a contact form when it helps customers send a detailed enquiry in one go. A project brief, a request involving several products or a message sent outside office hours may suit that format. Chat is useful when somebody has a short question and wants to ask a follow-up while looking at the page. The two contact options can serve the same website.

Try both routes with the question “Who should I contact about this service?”. Check which one helps the visitor reach an answer comfortably. On a phone, open the chat alongside any cookie notice and the page’s main button. Make sure customers can still continue browsing, submit the form or complete their purchase. Adjust the widget placement through its available settings if it covers an important control.

Keep useful contact options available and check the widget beside your Drupal page controls.
Keep useful contact options available and check the widget beside your Drupal page controls.

Which Drupal pages should you check?

Start with a content page, a landing page and any separately themed section. These checks catch differences between templates and publishing settings that a homepage-only test can miss. Visit each page directly, then navigate between them as a customer would. Confirm that the chat opens and that a message reaches the same intended workspace from each location.

Some parts of a platform have their own code restrictions or access settings. Use the platform instructions above when checking a checkout, customer account or other restricted area. Keep your existing support link available wherever the widget is not installed. A simple list of the pages you have checked helps the website maintainer repeat the right tests after a redesign.

Check a content page, a landing page and any separately themed section after publishing the Drupal installation.
Check a content page, a landing page and any separately themed section after publishing the Drupal installation.

How can you tell that messages reach the right team?

Send a message labelled “Website chat test” from the published Drupal site and find it in Replyze. Reply as a teammate and check that the answer appears in the visitor’s chat. Request a human handover and verify the notification route the team uses. This confirms the path in both directions.

For an agency or a business with several websites, repeat the test for each workspace. Check that the help articles and team access belong to the same business as the site. Ask the colleague who will answer real enquiries to try a reply. They should know where the conversation appears and which contact instructions customers see outside opening hours.

Follow a test message from your Drupal website into the team inbox and back to the visitor.
Follow a test message from your Drupal website into the team inbox and back to the visitor.

What if the widget is missing on Drupal?

First check the published site in a fresh browser window. Confirm that the installation change was saved and published, and follow any cache instructions in the guide above. Follow the Drupal installation method above and check that the intended theme and cache refresh include the changed code. Check the snippet location before changing its contents. A missing publish step or a different active template can explain why a change appears in an editor but not on the public website.

Once the widget appears, test typing, opening and closing it on a phone. Navigate to another page and try again. Keep the previous website configuration in your normal version history so the site maintainer can undo a mistaken placement. Removing the snippet from the website is a separate task from managing the Replyze workspace and its conversations.

If Drupal chat is missing, check publication and placement before adding a second snippet.
If Drupal chat is missing, check publication and placement before adding a second snippet.

What should you update after launch?

Read the first enquiries about services, department contacts and enquiry requirements. If several people ask the same question, improve the relevant help article and the page that prompted it. When a reply needs a teammate, check whether that person had enough information to continue. A useful first week often reveals a missing policy detail or a confusing link that is easy to fix.

Repeat the installation check after a theme change, a new template or a platform migration. Repeat the answer check when your services or policies change. Give the website maintainer the page list and give the support team the sample questions. That keeps both parts of your Drupal chat working as the site grows.

Keep the Drupal installation and the answers about services, department contacts and enquiry requirements up to date.
Keep the Drupal installation and the answers about services, department contacts and enquiry requirements up to date.

Let AI answer the questions you get every day

Teach it your answers, pick your colours and add it to your site. When a customer needs a person, your team takes over.

Card required · Cancel before day 15 and pay nothing. No card? Start on the Free plan.