Configuration
Set the widget's look, texts and features in the dashboard or in code, and how the two combine.
Most teams set everything in the widget editor at Settings → Widgets, with a live preview, and never pass options in code. Use code when a setting depends on the page or the user, like a dark-mode toggle or a per-product accent color.
How settings combine
For each setting, the widget uses the first value it finds:
- Options you pass to
initorupdate. - The widget’s settings in the dashboard.
- The built-in defaults.
| Setting | From code |
|---|---|
appearance: accent color, color mode, position, launcher icon and label | Overrides the dashboard |
texts | Overrides the dashboard, key by key. Keys you don’t set come from the dashboard |
locale, hideLauncher | Code only. There’s no dashboard setting |
features: ai, attachments, emailCapture, emoji, gifs | Can turn a feature off, never on |
| Security, branding, Slack routing, allowed domains | Dashboard only |
Features can only be turned off from code because anything code can turn on, a visitor could turn on from the browser’s developer tools. Ticketping enforces the dashboard value on the server. If code tries to turn on a feature the dashboard has off, the widget warns once in the console.
Security settings, such as allowed domains and Require verified identity, protect your team, so code can’t change them.
Examples
Match your site’s dark mode:
Ticketping('init', {
publishableKey: 'pk_...',
appearance: { colorMode: document.documentElement.classList.contains('dark') ? 'dark' : 'light' }
})
// Later, when the user toggles it:
Ticketping('update', { appearance: { colorMode: 'dark' } })Use your own button instead of the launcher:
<script>
window.Ticketping ||= (...args) => (Ticketping.q ||= []).push(args)
Ticketping('init', { publishableKey: 'pk_...', hideLauncher: true })
</script>
<script src="https://widget.ticketping.com/v2/loader.js" async></script>
<button onclick="Ticketping('open')">Help</button>A different greeting on the pricing page:
Ticketping('update', {
texts: { greetingTitle: 'Questions about plans?', greetingBody: 'We reply in a few minutes.' }
})Turn off GIFs and attachments for one app, even though the dashboard allows them:
Ticketping('init', { publishableKey: 'pk_...', features: { gifs: false, attachments: false } })When you call init yourself, put it before the loader script and leave data-key off the tag. init only runs once, so if the loader starts the widget from data-key first, your options are ignored.
Options
| Option | Values | Default |
|---|---|---|
appearance.accentColor | A hex color, like #0f766e | Dashboard |
appearance.colorMode | light, dark or auto (follows the visitor’s system setting) | Dashboard |
appearance.position | bottom-right or bottom-left | Dashboard |
appearance.launcher.icon | chat, help or none | Dashboard |
appearance.launcher.label | Text next to the icon, or null for none | Dashboard |
texts.greetingTitle | The heading on the home screen | Dashboard |
texts.greetingBody | The text under it | Dashboard |
texts.composerPlaceholder | The placeholder in the message box | Dashboard |
texts.conversationStarter | The first bubble in a new chat | Dashboard |
features.ai | false to turn off AI answers | Dashboard |
features.attachments | false to turn off file uploads | Dashboard |
features.emailCapture | false to stop asking anonymous visitors for an email | Dashboard |
features.emoji | false to hide the emoji picker | Dashboard |
features.gifs | false to hide the GIF picker. See GIFs and emoji | Dashboard |
locale | A BCP 47 tag, like fr or en-GB | Browser language |
hideLauncher | true to hide the floating button | false |
consent | granted, pending or denied. See consent | granted |
If you turn off emailCapture, your team can’t reach anonymous visitors who leave before you reply. Consider identifying users or keeping it on.
Copy prompt for your AI coding agent
Configure the Ticketping chat widget (v2) in code for this project.
Docs index: https://ticketping.com/llms.txt
This page as Markdown: https://ticketping.com/docs/configuration.md
- Pass options to Ticketping('init', { publishableKey, appearance, texts, features, locale, hideLauncher }) and change
them later with Ticketping('update', { ... }). Code overrides the dashboard for appearance and texts.
- features can only be set to false from code.
- If you call init yourself, remove data-key from the loader script tag.
- Keep colorMode in sync with this app's theme toggle if it has one.