Joomla websites use templates to control the design of the site. To show the MirajX chatbot on all pages, you usually place the embed code in the active Joomla template before the closing </body> tag.
First, copy your MirajX code
- Log in to your MirajX client dashboard.
- Open the embed or widget section.
- Copy the full script code. If the full token is not shown, regenerate the widget token and copy the new code immediately.
Find the active Joomla template
If you can log in to Joomla admin, go to System, then Site Templates or Templates. Note the active template name. You will need this name inside cPanel.
Step-by-step from cPanel
- Log in to cPanel.
- Open File Manager.
- Open the website root folder, usually
public_html. - Open
templates. - Open the folder with your active template name.
- Find
index.php. This is commonly the main template file. - Download a backup copy before editing.
- Click Edit.
- Scroll near the bottom and find
</body>. - Paste the MirajX embed code directly above
</body>. - Save the file.
Example placement
<!-- Joomla template content -->
<script
src="https://your-mirajx-domain.com/widgets/mirajx_chatboot.js"
data-webhook-url="https://your-mirajx-domain.com/api/runtime/chat"
data-widget-config-url="https://your-mirajx-domain.com/api/runtime/widget-config"
data-brand-name="Your Business Name"
data-tenant-id="YOUR_TENANT_ID"
data-agent-id="YOUR_AGENT_ID"
data-widget-token="YOUR_WIDGET_TOKEN"
></script>
</body>
If your Joomla template has no clear body tag
Some Joomla templates are more advanced and split the layout into several files. If you cannot find </body> in index.php, check folders such as layouts, html, or template framework files. If you are unsure, ask your web developer or hosting support before editing.
Testing after saving
- Clear Joomla cache from the admin panel if caching is enabled.
- Clear any hosting cache or CDN cache.
- Open the website in an incognito/private browser window.
- Check the bottom corner of the website for the chat bubble.
Important notes for Joomla clients
- Template updates may overwrite manual changes. Keep a copy of your MirajX code.
- Do not edit Joomla core folders unless your developer asks you to.
- If your website uses more than one template, add the code to the template used by the public pages.
- If the token was shared by mistake, regenerate it from MirajX.