Install guide

Installing a chat assistant on a Joomla site

Joomla gives you two honest routes and one that fails in a way people find genuinely baffling. The rich text editor removes script tags as you save, so a Custom module works only once you have turned the editor off first. The template route is sturdier, provided you copy the template before you touch it.

The tag

<script src="https://cdn.askably.xyz/w.js" data-key="pk_live_YOUR_KEY" defer></script>

Your own key replaces the placeholder. You will find it on the install tab of the assistant.

The origin the page is served from has to be on the allowlist for that assistant, or nothing renders and the browser console says which origin was refused. An apex domain and its www are two different origins to a browser, so list both, along with any staging or preview host you want it to work on.

Where it goes on Joomla

The Templates screen, under System in Joomla 4 and 5 and under Extensions in Joomla 3, editing index.php in a copy of your template. Or a Custom module in a footer position.

Any Joomla site where you have Super User access. Both routes are part of core, so there is nothing to install and no extension to buy.

Step by step

  1. 1On the Templates screen, duplicate your template first. Editing your own copy is what keeps the change through the next template or Joomla update.
  2. 2Open index.php in that copy, paste the tag immediately before the closing body tag, and save.
  3. 3If you would rather use a module, start by setting the editor to None in your own user profile. Do this before you open the module, not after: the editor strips the script tag the moment you save with it active.
  4. 4Create a Custom module, paste the tag into its body, choose a position your template renders near the end of the page, and assign it to all pages.
  5. 5In that module's options, turn content preparation off. With it on, the content plugins run over the module body and can rewrite or mangle the tag on the way out.
  6. 6Publish the module, then clear the Joomla cache from the system area and purge any page cache plugin or content network in front of the site.
  7. 7Load the site as a guest, in a private window, and confirm the launcher appears.

What goes wrong on Joomla

The editor removes the tag as you save it

Joomla's default rich text editor treats a script element as unwanted markup and quietly removes it when the module is saved. You paste the tag, save, reopen the module, and the body is empty or holds a mangled fragment of what you pasted. Nothing tells you it happened.

Set the editor to None in your user profile before creating or editing the module, and leave content preparation off in the module options so the content plugins do not get a second pass at it. If the tag keeps disappearing after that, you are editing with a different user account than you think.

A template update overwrites index.php

Templates update like anything else, and an update rewrites the template's own files. If you edited index.php inside the template as it shipped, your line is replaced with the vendor's version and the widget stops appearing on every page at once.

Duplicating the template first gives you a copy the updater does not own. It costs one click on the Templates screen and it is the difference between a change that lasts and one that survives until the next maintenance window.

Joomla caches at more than one level

Joomla has a global cache setting, a separate system cache plugin, and per module caching on top of that. A newly published module can be absent for guests while showing perfectly for you as a logged-in Super User, because you are not being served from the same cache they are.

Clear the cache from the system area after publishing, and confirm as a guest. If the tag is present in the guest page source and there is still no launcher, stop looking at Joomla: check the console for a refused origin.

Origins to allowlist

These are the origins a Joomla site is typically served from. List every one you want the assistant to answer on, including the ones only you visit.

  • https://yourdomain.com
  • https://www.yourdomain.com
  • https://test.yourdomain.com

How the tag behaves, wherever you put it

The rest of this is the same on every platform, so it is worth reading once rather than on each guide.

Loader behaviour
One tag, nothing elseThere is no second file, no stylesheet and no package to install. The tag is the whole install.
Where it goesImmediately before the closing body tag. It works in the head too, because it defers, but the body keeps it out of the way of anything that measures render order.
data-key is requiredWithout it the loader stops and writes a warning to the browser console rather than rendering anything.
It finds itselfThe loader reads the tag it was loaded from, and falls back to the first tag on the page carrying a data-key. Platforms that move or re-inject the tag do not break it.
It installs onceA second copy of the tag on the same page is ignored, so a template that renders twice does not produce two launchers.
Assets follow the tagEverything else it needs is fetched from the same origin the tag was served from, so a proxy or a private domain needs no extra configuration.
The panel loads lateOnly the small launcher is on the page at first. The conversation panel is fetched the first time a visitor opens it, in its own frame.
Styles cannot collideThe launcher renders inside a closed shadow root and the panel inside a frame, so nothing on the host page can restyle either, and neither can restyle the host page.

Set up on Joomla for a particular trade

The tag is the same everywhere. What is not the same is which of your pages the assistant can read once it is running, and on Joomla that depends on what kind of site this is. These go one level further than this guide.

Taking it off again

Unpublish or delete the Custom module, or remove the line from index.php in your template copy. Clear the cache afterwards, because a cached page still holds the old markup.

Before you remove it

  • Removing the tag stops the widget on that site. It does not delete the assistant, its material, or the enquiries it has already collected.
  • If you are moving the widget to a different host rather than retiring it, add the new origin to the allowlist before you remove the old tag, or there is a window where neither works.

Questions

Why did the tag vanish when I saved the module?
The rich text editor removed it. Set the editor to None in your user profile, reopen the module, paste the tag again, and save. Turning off content preparation in the module options stops the other half of the problem, where content plugins rewrite what did survive.
Template override or Custom module?
The template copy if you are comfortable editing index.php, because there is no editor and no content plugin between you and the output. The module if you want to publish and unpublish it without touching template files, and you are willing to set the editor to None first.
Does this work the same way on Joomla 3?
The tag is identical. What differs is where the screens live: templates and modules sit under Extensions in Joomla 3, and under System and Content in Joomla 4 and 5. The editor and caching gotchas apply to all of them.
Will it show up in the administrator area?
No, and it should not. Both routes affect the site template only, so the widget renders for visitors and never for you while you are working in the back end.

Keep reading

Try it on your own material

Upload a document or point it at your site, paste one line of HTML, then ask it something only your business could answer.