Guides
Configure the widget
Most settings can be found in the console’s widget builder. You can override some settings for one page using data attributes on your script tag.
On this page
You can set almost everything about the widget in two places: the widget builder in the console, or data-* attributes on the script tag. When both are set, the attribute wins. When neither is, the default applies. So the order is attribute, then console, then default.
Most teams change settings in the console. The widget pulls these settings from your console when it loads, so there is no deployment required. You can use data attributes for the exceptions: a different launcher label on one landing page, say, or a sidebar on the help centre only.
In the console
Go to Storefront → Widgets and edit one of your widgets. The widget builder has a live preview and is broken down into these tabs:
| Tab | Sections |
|---|---|
| Widget | Identity (name, mode, Status), Visibility (IP allow-list) |
| Appearance | Colours, Dark mode colours, Typography, Shape & depth, Launcher, Assistant avatar, Custom CSS |
| Behaviour | Engagement, Feedback, Talk to a human, Proactive triggers, Docked panel, Targeting, Business hours |
| Copy & disclosures | Copy, Disclosures & trust |
You can also change the copy or accent colour for a specific market or language using Copy by market, below the widget builder tabs: click Add a market.
Proactive triggers allow you to start a conversation with your customers at the right time, such as when they try to leave your site or are on their basket page. These are available on Growth and above. See Proactive prompts. Everything else on this page is available on all plans.
Where and when it shows
You can place the tags in a shared layout, because the Behaviour tab controls where your widget is visible:
- Targeting: Show only on URLs containing, Never show on URLs containing (up to 20 patterns each) and Limit to page types. With no page types ticked, the widget shows everywhere except checkout and order confirmation, which you tick explicitly if you want them.
- Engagement: Open automatically on a shopper’s first visit (once they close it, it stays closed), the delay before it opens, Remember the conversation across pages (what the browser keeps depends on consent, see cookie consent) and Hide on cart & checkout pages.
- Talk to a human: disable handoffs on a specific widget, perhaps for a landing page or a kiosk in your store.
- Business hours: set your team’s hours and timezone. Your assistant continues to answer questions outside of these hours, and if a customer asks for a human, they are offered the chance to leave a message instead of a live chat.
Modes
| Mode | What shoppers see | Notes |
|---|---|---|
chat |
A floating launcher that opens the chat | Six position values, from bottom-right to top-left |
sidebar |
A panel docked to the left or right of the page | Overlays the page or pushes it aside; 280 to 720 px wide; never opens by itself on a phone |
inline |
A panel inside an element you choose | Good for a help page or a product page tab |
Data attributes
Put identity and placement attributes on both tags where the Install snippet does; the rest go on the loader tag (the one before </body>). Values are strings, so write "true" and "false" in quotes.
Identity
| Attribute | Values | What it does |
|---|---|---|
data-token |
Your Storefront widget key | The browser key. Loader tag only. |
data-widget-public-id |
wgt_... |
Which widget to show. data-widget also works. |
data-website-id |
A number | Which website. Leave it out for a widget that serves all your storefronts. |
data-scope |
A market or language reference | Which market’s wording and colours to use. data-scope-ref also works. |
data-instance-id |
Any short name | Tells two placements of the same widget apart on one page. |
Placement
| Attribute | Values | What it does |
|---|---|---|
data-mode |
chat, sidebar, inline |
The mode for this page |
data-position |
right, left, bottom-right, bottom-left, top-right, top-left |
Where the chat launcher sits |
data-target |
A CSS selector | The element an inline widget appears in |
data-dock-side |
left, right |
Which side a sidebar docks to |
data-dock-layout |
overlay, push |
Whether the sidebar covers the page or pushes it aside |
data-dock-width |
280 to 720 | Sidebar width in pixels |
data-dock-breakpoint |
320 to 1920 (default 768) | Below this screen width the sidebar never opens by itself, and overlays the page rather than pushing it |
data-open |
"true" |
Open the sidebar when the page loads |
Look
| Attribute | Values | What it does |
|---|---|---|
data-accent |
A colour, such as #2f4a3a |
The main brand colour |
data-corner-radius |
0 to 32 | Corner radius in pixels |
data-theme |
light, dark, system |
Light or dark, or follow the shopper’s device |
data-launcher-label |
Text | The words on the launcher |
data-launcher-icon |
An emoji or short text | The launcher icon |
data-launcher-shape |
pill (default), circle, square |
The launcher shape |
data-launcher-size |
small, medium (default), large |
The launcher size |
data-appearance |
JSON | The full appearance settings in one attribute, as the console stores them |
Copy and behaviour
| Attribute | Values | What it does |
|---|---|---|
data-title |
Text | The chat header |
data-placeholder |
Text | The hint in the message box |
data-welcome-message |
Text | The greeting shoppers see first |
data-suggested-prompts |
Questions separated by | |
Up to five starter questions |
data-ai-identity |
Text | The first message saying shoppers are talking to an AI. It cannot be emptied. |
data-accuracy-disclaimer |
Text | The accuracy note under the chat |
data-show-disclaimer |
"true" (default), "false" |
Show or hide the accuracy note |
data-auto-open |
"true" |
Open the chat by itself |
data-auto-open-delay |
0 to 120 | Seconds to wait before opening |
data-auto-open-trigger |
delay, scroll, exit, none |
What opens it: time, scroll depth or exit intent |
data-auto-open-scroll-pct |
0 to 100 (default 50) | How far down the page counts as scrolled |
data-suppress-on-checkout |
"true" (default), "false" |
Hide the widget on basket, checkout and order confirmation pages |
data-behaviour |
JSON | The full behaviour settings in one attribute |
data-fetch-config |
"false" |
Skip the console settings and use only the attributes |
data-sku |
A SKU | The product this page is about |
data-page-type |
home, plp, pdp, search, cart, checkout, success, cms, account, other |
The kind of page |
Example
This moves your launcher to the bottom left, changes the label and adds three starter questions to a page. You should change the position on both tags to ensure your launcher is in the correct position when the widget opens.
<!-- Ottla: in the <head> of every page -->
<script async src="https://ottla.ai/widget/ottla-bootstrap.min.js"
data-widget-public-id="wgt_xxxxxxxxxxxxxxxxxxxx"
data-website-id="12"
data-mode="chat"
data-position="bottom-left"></script>
<!-- Ottla: before </body> on every page -->
<script async src="https://ottla.ai/widget/loader.js"
data-token="YOUR_BROWSER_KEY"
data-widget-public-id="wgt_xxxxxxxxxxxxxxxxxxxx"
data-website-id="12"
data-position="bottom-left"
data-launcher-label="Ask our experts"
data-suggested-prompts="Which tent is lightest?|Do you deliver to Ireland?|How do I choose a sleeping bag?"></script>
Product pages
Providing the widget with product context helps it answer questions on a product page, such as “Is this waterproof?”, which then has an obvious subject. The widget looks for product context in the following order:
data-skuon the loader tag;- a meta tag named
product:retailer_item_id,product:skuorsku; - Product structured data (JSON-LD) on the page.
The page type comes from data-page-type, or is worked out from the URL and any Product markup. Most storefronts already print one of these, so check before adding anything.
<!-- Any one of these tells the widget which product the page is about -->
<script async src="https://ottla.ai/widget/loader.js"
data-token="YOUR_BROWSER_KEY"
data-widget-public-id="wgt_xxxxxxxxxxxxxxxxxxxx"
data-website-id="12"
data-sku="TENT-2P"
data-page-type="pdp"></script>
<meta property="product:retailer_item_id" content="TENT-2P">
Custom CSS
The chat renders inside its own shadow root, so your site’s styles cannot reach into it by accident. To restyle it on purpose, use Custom CSS in the builder’s Appearance tab. It accepts only :host and .ottla-* selectors; anything else is removed when you save.
FAQ
Frequently asked questions
Which wins, the console or a data attribute?
The data attribute on the page. If not present, it uses the value from your console. If that’s not present, it uses the default.
Can I hide the widget on checkout?
It is hidden on basket, checkout and order confirmation pages by default. Set data-suppress-on-checkout="false" if you want it there.
Can I change the wording per language or market?
Yes. Navigate to Copy by market below the widget builder tabs. Click Add a market and you can change the copy or accent colour for that market or language.
Can I remove “Powered by Ottla”?
No. We always show a small “Powered by Ottla” message in the chat.
Can the chat open automatically?
Yes: after a delay, when a customer scrolls to a certain depth or when they try to leave your site. Sidebars never open automatically on a phone.
Can I use my own font?
Yes, in the builder’s Typography section. If the font is hosted on another domain, allow that host in your font-src policy.
Next
Install the widget
The two tags and how to verify they’re working.
JavaScript events and consent
Trigger the assistant from your own buttons and pass basket context.
Assistant controls
How your assistant talks, its guardrails and what it can say.
Hyvä themes and Hyvä Checkout
Styling the blocks the Magento module renders.