<script> tag into your HTML. There is no build step, no framework requirement, and no engineer needed. The widget loads asynchronously so it never blocks your page, and every aspect of its appearance is configurable directly from the MerchantAI dashboard without touching your code again.
Get your widget snippet
Open the Deploy section in your dashboard
Log in to the MerchantAI dashboard and navigate to Deploy → Widget. Your unique script snippet is shown here, pre-populated with your workspace ID.
Paste it before the closing body tag
Open the HTML template (or theme file) for every page where you want the widget to appear. Paste the snippet immediately before the closing
</body> tag.Script snippet
Here is what the widget snippet looks like. ReplaceYOUR_WORKSPACE_ID with the value shown in your dashboard (it is pre-filled when you copy from there).
async attribute ensures the script is fetched in the background and does not block rendering of the rest of your page content.
Customising the widget
You control the full appearance of the widget from the Widget settings section of your dashboard. None of these changes require you to update the script snippet — you edit once in the dashboard and the widget reflects the change immediately.Colours
Set a primary colour to match your brand. The widget button, header, and accent elements all inherit this value.
Position
Choose bottom-right or bottom-left to avoid conflicting with other on-page elements like cookie banners or live-chat triggers.
Avatar
Upload a custom avatar image for your AI associate — a brand logo, illustrated character, or team photo all work well.
Greeting message
Set the opening message visitors see when they open the widget. Use it to guide them toward the questions you most want the agent to handle.
Works on any platform
Because the widget is a plain HTML script tag, it works on every platform that lets you edit page source or add custom code.WordPress
Add the snippet via a custom HTML block, your theme’s
footer.php, or a plugin like Insert Headers and Footers.Webflow
Paste the snippet into Project Settings → Custom Code → Footer Code to add it site-wide.
Squarespace
Use Settings → Advanced → Code Injection → Footer to embed the snippet on every page.
Custom HTML
Any static site or server-rendered app — paste the snippet before
</body> in your base layout template.Any CMS
If your CMS lets you inject a script tag into the page footer, MerchantAI will work there too.
Knowledge sources for non-Shopify sites
When you use the JS widget on a website that is not connected to Shopify, your agent draws its knowledge from the sources you configure in the MerchantAI dashboard:- Website crawl — MerchantAI can crawl your published website to index your content automatically.
- Uploaded files — Upload PDFs, DOCX files, or plain text documents such as product guides, FAQs, or policies.
- Q&A pairs — Manually add specific question-and-answer pairs for precise control over how common questions are answered.
The JS widget is available on all plans, including the Free plan. You can embed the widget and start handling visitor questions straight away during your free trial.

