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:

  1. Options you pass to init or update.
  2. The widget’s settings in the dashboard.
  3. The built-in defaults.
SettingFrom code
appearance: accent color, color mode, position, launcher icon and labelOverrides the dashboard
textsOverrides the dashboard, key by key. Keys you don’t set come from the dashboard
locale, hideLauncherCode only. There’s no dashboard setting
features: ai, attachments, emailCapture, emoji, gifsCan turn a feature off, never on
Security, branding, Slack routing, allowed domainsDashboard 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:

js
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:

html
<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:

js
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:

js
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

OptionValuesDefault
appearance.accentColorA hex color, like #0f766eDashboard
appearance.colorModelight, dark or auto (follows the visitor’s system setting)Dashboard
appearance.positionbottom-right or bottom-leftDashboard
appearance.launcher.iconchat, help or noneDashboard
appearance.launcher.labelText next to the icon, or null for noneDashboard
texts.greetingTitleThe heading on the home screenDashboard
texts.greetingBodyThe text under itDashboard
texts.composerPlaceholderThe placeholder in the message boxDashboard
texts.conversationStarterThe first bubble in a new chatDashboard
features.aifalse to turn off AI answersDashboard
features.attachmentsfalse to turn off file uploadsDashboard
features.emailCapturefalse to stop asking anonymous visitors for an emailDashboard
features.emojifalse to hide the emoji pickerDashboard
features.gifsfalse to hide the GIF picker. See GIFs and emojiDashboard
localeA BCP 47 tag, like fr or en-GBBrowser language
hideLaunchertrue to hide the floating buttonfalse
consentgranted, pending or denied. See consentgranted

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

prompt
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.