Options

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.

NameTypeDescriptionDefault
baseUristringGlassix dedicated server urlhttps://app.glassix.com
serverlessUrlstringGlassix dedicated server urlhttps://serverless.glassix.com
culturestring
participantNamestring
participantPhoneNumberstring
participantMailAddressstring
enableParticipantNameboolean
isParticipantNameOptionalboolean
Cventsobject
verboseLoggingbooleanAdditional logsFALSE
uniqueIdentifierGuidIf your visitor is uniquely identified, this will override our cookie.
disableIntroductionMessagebooleanDon't show the intro message at all.FALSE
disableIntroductionMessageOnMobilebooleanDon't show the intro message on mobile devices.
introductionMessageTextstringThe introduction message shown to the site visitor.
chatNowPromptTextstringThe click to action message under the introduction message.
setWidgetAsVisibleTimeoutInMilisecondsintegerAutomatically open the chat widget, in milliseconds, after initialization.
tagsArray [string]Set the ticket tags.
defaultParticipantMessagestring
enableParticipantMessagebooleanTRUE
isParticipantMessageOptionalbooleanFALSE
usePhoneNumberbooleanFALSE
newConversationWithoutFormbooleanRemoves 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.

NameTypeValueDefault
widthstringValid css value
heightstringValid css value
positionstring'left' , 'right''left'
bottomstringpixels + 'px'
launcherColorstringHexadecimal color
launcherIconstringUrl of an image to replace the default icon
mobileLauncherSizestring'normal', 'medium' , 'small''normal'
mobilePositionstring'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).

NameTypeDescription
field1stringOptional dynamic parameter value
field2stringOptional dynamic parameter value
field3stringOptional dynamic parameter value
field4stringOptional dynamic parameter value
field5stringOptional dynamic parameter value
field6stringOptional dynamic parameter value
field7stringOptional dynamic parameter value
field8stringOptional dynamic parameter value
field9stringOptional dynamic parameter value
field10stringOptional dynamic parameter value

Accessibility

These options improve the widget's experience for visitors using assistive technologies such as screen readers.

NameTypeDescriptionDefault
launcherButtonAriaLabelstringThe 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>