The messenger is the chat widget your AI agent answers in. You add it to your website by pasting a short install code once.

What the animation shows:
- On Install, click Enable widget.
- Copy the website install code.
- Paste it into your site's footer code and save.
- Open your website. The launcher appears, and clicking it opens the messenger.
Before you start
- Your agent has some training content and you've tested it in the Playground.
- You can edit your website's code, or its site builder lets you add custom code.
1. Allow your website
- Open your agent and go to Guardrails.
- Under Allowed domains, type each website the widget may load on, for example
example.com, and click Add. A note under the box shows how a pasted address will be saved. - Click Save changes.
The plain address and its www version count as the same site, so example.com covers www.example.com. You can paste a full page address: the path and port are ignored. Other subdomains such as shop.example.com need their own line, or *.example.com to cover them all. The widget won't load on sites that aren't listed.
2. Turn on the widget
Go to Install and click Enable widget. The button appears once you have saved an allowed domain. You can click Take offline at any time to hide it everywhere.
3. Paste the install code
Copy the Website install code from the Install tab. Paste it at the end of the body on every page where the messenger should appear, just before the closing </body> tag. It looks like this:
<script src="https://mavis.help/messenger.js" referrerpolicy="strict-origin-when-cross-origin" async></script>
<script>
window.AskMavisMessenger = window.AskMavisMessenger || [];
window.AskMavisMessenger.push({
messengerConfigId: "your-agent-id",
consent: 'granted',
});
</script>
Always copy the code from your own Install tab, since it contains your agent's ID. If your site has a Content Security Policy, allow https://mavis.help.
Site builders
Under Where to paste the code on the Install tab, pick your website builder to see its steps.
WordPress: install a free header and footer code plugin, such as WPCode (Insert Headers and Footers). Open its Header & Footer settings, paste the code into the Footer box and save. Or add a Custom HTML block to your footer in Appearance > Editor and paste the code there.
Wix: open Settings > Custom Code and click Add Custom Code. Paste the code, choose All pages, Load code once and Body - end, then apply and publish. Wix needs a paid plan with a connected domain for this.
Squarespace: open Code Injection and paste the code into the footer, then save. It needs a plan that includes code injection.
Shopify: go to Online Store > Themes, open the ... menu on your theme and choose Edit code. Open layout/theme.liquid, paste the code just before </body> and save.
Webflow: open Site settings > Custom code, paste the code into Footer code and save. Webflow needs a paid site plan for this.
Google Tag Manager: create a Custom HTML tag, paste the code, set the trigger to All Pages, then submit and publish the container.
Check it works
Open your website in a new tab. The chat launcher appears in the corner. Ask it a question.
If it doesn't appear:
- Check your site's address is in Allowed domains. Whether you type
https://doesn't matter, but a subdomain such asshop.example.comneeds its own line or*.example.com. - Check the widget is enabled on the Install tab.
- Check your country isn't in Country blocking.
- Clear your browser cache or try a private window.