The full list of options you can pass to the Glassix chat widget.
This document outlines the available options for configuring and styling the Glassix chat widget and serves as a reference for developers integrating or maintaining the widget across our products.
Overview
Options let you customize how the chat widget behaves, looks, and collects information. You add them to the widgetOptions object in your installation script, before you paste it onto your site. For a step-by-step walkthrough of how this fits into the installation process, see the Installation guide.
var widgetOptions = {
apiKey: "your-api-key",
snippetId: "your-snippet-id",
// Add any of the options below here
newConversationWithoutForm: true,
position: "right"
};The options are grouped into four categories:
- Configuration: controls the widget's behavior, including participant details, introduction messages, and tags.
- Design: control the widget's appearance, including size, position, colors, and the launcher icon.
- Fields: dynamic parameters that the widget can fill in automatically on the ticket.
- Accessibility: options that improve the experience for assistive technologies.
Configuration
These options control how the widget behaves, including the server it connects to, the participant details it collects, the introduction message, and tagging.
| Name | Type | Description | Default |
|---|---|---|---|
| baseUri | string | Glassix dedicated server url | https://app.glassix.com |
| serverlessUrl | string | Glassix dedicated server url | https://serverless.glassix.com |
| culture | string | ||
| participantName | string | ||
| participantPhoneNumber | string | ||
| participantMailAddress | string | ||
| enableParticipantName | boolean | ||
| isParticipantNameOptional | boolean | ||
| Cvents | object | ||
| verboseLogging | boolean | Additional logs | FALSE |
| uniqueIdentifier | Guid | If your visitor is uniquely identified, this will override our cookie. | |
| disableIntroductionMessage | boolean | Don't show the intro message at all. | FALSE |
| disableIntroductionMessageOnMobile | boolean | Don't show the intro message on mobile devices. | |
| introductionMessageText | string | The introduction message shown to the site visitor. | |
| chatNowPromptText | string | The click to action message under the introduction message. | |
| setWidgetAsVisibleTimeoutInMiliseconds | integer | Automatically open the chat widget, in milliseconds, after initialization. | |
| tags | Array [string] | Set the ticket tags. | |
| defaultParticipantMessage | string | ||
| enableParticipantMessage | boolean | TRUE | |
| isParticipantMessageOptional | boolean | FALSE | |
| usePhoneNumber | boolean | FALSE | |
| newConversationWithoutForm | boolean | Removes the introduction form completely from the new conversation window. | FALSE |
Design
These options control the widget's appearance, size, placement on the page, colors, and launcher icon, with separate settings for mobile devices. Values are standard CSS values unless noted otherwise.
| Name | Type | Value | Default |
|---|---|---|---|
| width | string | Valid css value | |
| height | string | Valid css value | |
| position | string | 'left' , 'right' | 'left' |
| bottom | string | pixels + 'px' | |
| launcherColor | string | Hexadecimal color | |
| launcherIcon | string | Url of an image to replace the default icon | |
| mobileLauncherSize | string | 'normal', 'medium' , 'small' | 'normal' |
| mobilePosition | string | 'left' , 'right' |
Fields
Fields are dynamic parameters that the widget can fill in automatically. When you pass a value to a field, it's set on the ticket created from the conversation, which is useful for carrying over information you already know about the visitor (such as an account ID or plan type).
| Name | Type | Description |
|---|---|---|
| field1 | string | Optional dynamic parameter value |
| field2 | string | Optional dynamic parameter value |
| field3 | string | Optional dynamic parameter value |
| field4 | string | Optional dynamic parameter value |
| field5 | string | Optional dynamic parameter value |
| field6 | string | Optional dynamic parameter value |
| field7 | string | Optional dynamic parameter value |
| field8 | string | Optional dynamic parameter value |
| field9 | string | Optional dynamic parameter value |
| field10 | string | Optional dynamic parameter value |
Accessibility
These options improve the widget's experience for visitors using assistive technologies such as screen readers.
| Name | Type | Description | Default |
|---|---|---|---|
| launcherButtonAriaLabel | string | The aria-label attribute of the launcher button | 'Chat' |
Attaching the Widget to a Custom Element
By default, the widget attaches itself to the page automatically. If you want to control which DOM element the widget attaches to, add the following div to your page:
<div id="glassix-client"></div>