Install the widget
Copy the snippet from Installation in the dashboard: it already contains your client ID. It looks like this:
<script src="https://askvio.web.app/widget.js"></script>
<script>
window.askvioWidget.init({
clientId: "YOUR_CLIENT_ID",
agentId: "default"
});
</script>
Load widget.js without async before calling init, as above. If you load it asynchronously, call init from the script's onload instead.
Method 1: Google Tag Manager (recommended)
- Create a new Custom HTML tag in your container.
- Paste the snippet.
- Trigger it on All Pages, or only on the pages where you want the assistant.
- Preview, then publish the container.
Method 2: Directly in your site's code
Paste the snippet before the closing </body> tag on every page where you want the assistant.
Options
| Option | Description |
|---|---|
clientId | Your site's ID (required). |
agentId | Which agent to load. Defaults to default. |
environment | prod (default) or test. Use test on staging sites (see Multi environment). |
Check that it works
- Open your site and ask a question.
- In the browser console,
window.askvioWidget.getWebMcpStatus()shows whether AI-agent tools were registered. - If the widget doesn't appear, look for an
[AskVio]message in the console. The most common causes are a domain missing from the origin allowlist and a site over its monthly question limit, in which case the widget stays hidden on purpose.