Attributes
The tag's data attributes: corner, launcher, theme, colours, language, teaser and panel, for one site without changing the deployment.
Everything but data-key is optional. An attribute wins over the deployment's appearance, so use attributes for what one site needs and the appearance for what every site shares. TalkWidget('update', …) wins over both, for one page.
<script
async
src="https://talk.madein10.com/widget.js"
data-key="pk_live_…"
data-position="bottom-left"
data-launcher="face_label"
data-label="Talk to Sophie"
data-theme="auto"
data-teaser-delay="8"
></script>All attributes
| Attribute | Values | What it sets |
|---|---|---|
data-key | pk_live_… or pk_test_… | The deployment. Required |
data-position | bottom-right (default), bottom-left | The corner |
data-offset-x, data-offset-y | 0 to 160 (px) | Distance from the window's edges (default 20) |
data-launcher | face, face_label, card, pill, icon, tab, or none | The launcher's style; none shows no launcher at all (below) |
data-combine | intercom, crisp, zendesk, tawk, livechat, hubspot, tidio, drift, custom | One launcher for your site's chat and ours (below) |
data-mobile-launcher | the same | Its style on phones (default: the same, but a card shows as a face) |
data-label | text | The launcher's label (shown by face_label, pill and tab) |
data-theme | light, dark, auto | auto follows the visitor's system setting |
data-accent, data-on-accent, data-ink, data-paper | #rrggbb | Colours of the theme in use (the dark one with data-theme="dark") |
data-language | en, fa, de… | The widget's language; else the page's <html lang>, else the browser's |
data-teaser | text, or off | One teaser message for every language, or no teaser |
data-teaser-delay | 0 to 120 (s) | When the teaser pops up after the page loads |
data-teaser-frequency | every_visit, once_per_session, once_per_day | How often it pops up |
data-title, data-subtitle | text | The panel's header |
data-open | true, 1 or yes | Open the panel when the page loads |
data-character | a character's id (chr_…) | On this page, start with this one of the deployment's characters (one it offers; else its own) |
Colours
The four colours are the widget's whole palette: accent (the launcher's ring, buttons, the AI badge), on-accent (text on the accent), ink (text) and paper (backgrounds). Each is a #rrggbb hex colour. On the tag they apply to the theme in use; to set both a light and a dark palette, use the deployment's appearance (colors and dark_colors).
Language
The widget's language is data-language, else your page's <html lang>, else the visitor's browser's. It picks your texts in that language, else our own words in it, else your English ones. Persian, Arabic, Hebrew and Urdu turn the widget right to left. The visitor still picks the call's language in the panel.
Opening it from your own button
data-open="true" (or "1", or "yes", in lower case) opens the panel as the page loads; the call starts from the visitor's click inside it. To open it from a button of yours, use the JavaScript API: TalkWidget('open'), or TalkWidget('start', { … }) to start the call at once.
No launcher of ours
data-launcher="none" shows no launcher and no teaser of ours. Open the panel from your own button, anywhere on the page or inside your own chat, with the JavaScript API:
<script>window.TalkWidget=window.TalkWidget||function(){(TalkWidget.q=TalkWidget.q||[]).push(arguments)}</script>
<script async src="https://talk.madein10.com/widget.js" data-key="pk_live_…" data-launcher="none"></script>
<button type="button" onclick="TalkWidget('open')">Talk face to face</button>The panel opens from the corner data-position names, and as a full-screen sheet on a phone, as it always does. The deployment's appearance can set the same with launcher.mode: "none".
One launcher with your chat
If your site already has a chat bubble, ours can be the only launcher: a click offers Chat (your chat) or Talk face to face (our call), in the widget's language. Name your chat with data-combine:
<script async src="https://talk.madein10.com/widget.js" data-key="pk_live_…" data-combine="intercom"></script>- Your chat's own snippet stays as it is. Its launcher is hidden through its own JavaScript API, and its chat opens when the visitor picks Chat. Ours steps aside while your chat is open and comes back when it closes.
- If your chat hasn't loaded within 15 seconds (blocked, or set up wrongly), our launcher simply opens the call.
- The teaser offers both.
- The deployment's appearance can set the same with
launcher.mode: "combined"andlauncher.combine.provider, and the chooser's words withlabel_chatandlabel_talk.
Any other chat, or your own: data-combine="custom", and tell the widget your chat's functions before the tag:
<script>
window.TalkWidget=window.TalkWidget||function(){(TalkWidget.q=TalkWidget.q||[]).push(arguments)};
TalkWidget('combine', {
label: 'Chat', // the chooser's first option (default: ours, in the page's language)
open: function () { myChat.open(); }, // open your chat
hide: function () { myChat.hideLauncher(); }, // hide your chat's own launcher (optional)
onClose: function (done) { myChat.on('close', done); } // call done() when your chat closes (optional)
});
</script>
<script async src="https://talk.madein10.com/widget.js" data-key="pk_live_…" data-combine="custom"></script>Without onClose, our launcher stays where it is while your chat is open.