Add Olotalk to Drupal

The cleanest way to add a site-wide script in Drupal — without editing theme templates — is a custom block placed in a footer region.

You’ll need your Assistant ID (ast_oltk_…) from your assistant’s Install step. This guide covers Drupal 10 / 11. New here? Start with the Quick start.


1. Create a custom block with the snippet

Go to Content → Blocks → Add content block. In the block body, set the Text format to Full HTML, switch the editor to source / code view, and paste:

<script
  src="https://cdn.jsdelivr.net/npm/@olotalk/assistant-loader@0/dist/loader.iife.js"
  data-olotalk-assistant-id="YOUR_ASSISTANT_ID"
  async
></script>

Save the block.

Text format matters. Only Full HTML leaves <script> untouched. Basic HTML and Restricted HTML strip script tags during filtering, so the assistant never loads. Full HTML is an admin/trusted format — choose it deliberately.

Go to Structure → Block layout, find a footer region (for example Footer or Footer bottom), click Place block, and select the block you just created. Save the placement.

If the launcher doesn’t appear right away, clear caches under Configuration → Performance.


Allow your domain

Drupal is self-hosted, so add the exact hostname(s) where your site runs — production and any staging hostname — under your assistant’s Install domains.


Verify

Open your site and look for the chat launcher in the bottom-right. Then check your dashboard: the Install step’s Install status card shows Seen on yourdomain.com once the snippet loads — with a one-click fix if the domain isn’t allowed yet. Nothing there? See Troubleshooting.