Widget
Configuration
Everything about how the widget looks and behaves is configured in the dashboard and published to your site. No code changes needed.
Design
| Setting | Description |
|---|---|
| Colors | Primary (header, launcher, buttons) and its text color, background, text, visitor bubble, assistant bubble. The designer warns when contrast is below WCAG AA. |
| Corner radius | 0–28 px, applied to the panel, bubbles, cards and buttons. |
| Font | inherit uses your page’s body font; or any font stack already loaded by your page. |
| Mode | Light, dark, or auto (follows the visitor’s system setting). |
| Launcher | Bottom-right or bottom-left, offsets, size (S/M/L), icon only or icon + text (e.g. “Need help?”), optional custom icon image. |
| Header | Title and subtitle per language, avatar or logo image. |
Behavior
| Setting | Description |
|---|---|
| Greeting | First message shown when the chat opens, per language. |
| Suggested questions | Up to 6 chips shown before the first message, per language. Defaults depend on your shop’s vertical. |
| Proactive greeting | Off by default. After N seconds (3–600) a small bubble with your greeting appears next to the launcher, once per browser session. |
| Open on load | Opens the chat automatically on desktop. Phones are never taken over. Nothing is stored until the shopper uses the chat. |
| Show prices / Add to cart | Show prices on product cards; show an “Add to cart” button (see add-to-cart). |
| Tone | Friendly, professional, concise or detailed. |
| Escalation | Offer the contact form when a human is needed. |
| Privacy policy URL | Linked from the AI disclosure line shown to every visitor and from the contact form. If empty, the widget links to the AskMerra privacy notice for shoppers instead. |
| Branding | “Powered by AskMerra” footer, removable on Growth and above. |
Show and hide by page
Use path patterns to control where the launcher appears. * matches anything:
| Pattern | Matches |
|---|---|
/checkout | exactly /checkout |
/checkout* | /checkout, /checkout/payment, … |
/blog/* | every page under /blog/ (not /blog itself) |
*cart* | any path containing “cart” |
Hide on paths always wins. If Show only on paths has entries, the widget appears only on matching pages. Tip: hide it on checkout to keep the purchase flow distraction-free.
Language detection
The widget interface language is chosen in this order:
data-localeon the script tag, orAskMerraSettings.locale- the page’s
<html lang> - the browser languages
- your shop’s default language
You can switch it at runtime with AskMerra.setLocale('it'). Independently, the assistant always replies in the language the visitor writes in. Texts you configure per language (greeting, suggestions, title) fall back to your default language, then English.
The settings object
Optional; define it before the snippet. Every key is optional.
<script>
window.AskMerraSettings = {
siteKey: 'pk_live_…', // instead of data-site-key (tag managers)
locale: 'ro', // force the interface language
open: false, // open on load (desktop only)
position: 'bottom-left', // override the configured position
productId: 'LUM-SE-01', // product shown on this page
onReady: function () { // called once the widget is ready
AskMerra.on('add_to_cart', function (p) { /* … */ });
},
};
</script>Storage & privacy
The widget stores nothing in the shopper’s browser until the shopper opens the chat or starts typing in it. Loading the page, showing the launcher or the proactive greeting, and opening the panel automatically (data-open or Open on load) store nothing and send no identifier. Once the shopper uses the chat, the widget keeps only what the chat needs to work:
| Key | Where | What it holds | Kept for |
|---|---|---|---|
askmerra:visitor | localStorage | A random id, so the shopper can continue their conversation on other pages and visits. | 30 days after the last chat |
askmerra:session:<site key> | localStorage | A short-lived security token that protects the chat from bots and abuse. | 30 minutes |
askmerra:<site key>:conversation | localStorage | The id of the current conversation, so it can be shown again. | 24 hours after the last message |
askmerra:<site key>:open | sessionStorage | That the chat is open, so it stays open while the shopper browses. | Until the tab is closed, or the chat is closed |
askmerra:<site key>:proactive | sessionStorage | That the shopper closed the proactive greeting, so it is not shown again. | Until the tab is closed |
<site key> stands for the first 16 characters of your public site key. Expired values are removed the next time the widget loads. The widget sets no cookies and does no fingerprinting. Analytics events (chat opened, suggestion clicked, product clicked) are sent only after the shopper interacts with the chat. When a shopper who chatted before comes back, the stored ids are used to show their recent conversation. AskMerra.forget() deletes the shopper’s chat data and removes the id, token and conversation. Without storage (private mode, blocked storage) the widget still works for the current page.
Sales tracking uses the same id, for a second purpose: on your order confirmation page the widget links the purchase to the shopper’s chat. It does that only when your cookie banner allows analytics (Google Consent Mode or AskMerra.setConsent()), only for shoppers who chatted, and it sends no personal data. List it under analytics in your cookie banner. Details in the JavaScript API.
The cookie page has the full table, ready to copy into your own cookie policy.