Advanced widget placement
The standard install puts a floating bubble in the corner of every page. These options cover the cases where that is not what you want.
Configuration options
window.MIKADO_CHATBOT_CONFIG accepts four keys:
| Key | Required | Purpose |
|---|---|---|
domain | yes | The Mikabot app URL. Pre-filled in your snippet. |
store_id | yes | Your chatbot key from Settings → Chatbot settings. |
language | no | Starting language. Defaults to en and falls back to page detection. |
container | no | A CSS selector. When set, the chat renders inside that element instead of as a floating bubble. |
Embed the chat inside the page
Use container when the chat should live in a section of the page — an advice page, a support page, a product configurator.
<div id="mikabot-inline" style="height: 600px;"></div>
<script>
window.MIKADO_CHATBOT_CONFIG = {
"domain": "https://mikabot.studio-mikado.be",
"store_id": "st_your_chatbot_key",
"language": "en",
"container": "#mikabot-inline"
};
</script>
<script src="https://mikabot.studio-mikado.be/js/mikabot-init.js"></script>
Rules that matter:
- The container element must exist in the DOM before the loader runs. If the selector matches nothing, the widget does not render at all.
- Give the container an explicit height. The chat fills its parent.
- In container mode there is no toggle button — the chat is always open.
Tag managers
The snippet works in Google Tag Manager as a Custom HTML tag:
- Create a Custom HTML tag
- Paste both script tags, config first
- Trigger it on All Pages
- Leave Support document.write unchecked
- Publish, then verify with a private window
Do not also place the snippet in your theme. One installation only.
Single-page apps
The loader attaches on window load and the widget survives client-side navigation, so you only mount it once:
- Next.js — use the Next.js snippet from Settings → Site info → Install widget. It renders both scripts with
strategy="afterInteractive"from a client component in your root layout. - Other frameworks — mount the two script tags in your root layout or app shell, not in a route component. Mounting per route creates duplicates.
If your app changes language client-side, reload the page after the switch. language is read when the widget initialises.
Debug logging
Add "debugLogging": true to the config to print widget activity to the browser console. Useful when a store’s CSP or an ad blocker interferes.
Turn it off before going live — it is noisy and visible to anyone who opens the console.
Caching
The loader requests the main script with a version query string, so a new Mikabot release invalidates itself. If your CDN caches HTML aggressively, it is your own page — not the widget — that needs purging after you paste the snippet.
Related
Related articles
Account setup
Create your Mikabot account, verify your email, and find your way around the dashboard.
Create your first chatbot
Walk through the five-step setup wizard and get a working chatbot in minutes.
Install the widget
Copy your embed snippet and get the Mikabot chat widget live on your website.
Contact us
Our support team is ready to give you fast, personal help when you need it.