Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The integration through CTLive events allows to integrate the library functions with custom code via JavaScript code. The integration takes place by listening in the main webpage document of the PostMessage events that are launched on specific actions.

Events

Event

Description

Notes

Data sent in object property

Loaded

Notifies that the library has been loaded and the configuration has been read

elementID: string that contains HTML element id containing the widget

widgetID: string that contain the unique widget identifier

userID: string that contain the unique user identifier

WidgetShown

The widget is shown

If the page is configured to show more than one widget an event is raised for each widget

elementID: string that contains HTML element id containing the widget

widgetID: string that contain the unique widget identifier

userID: string that contain the unique user identifier

WidgetHidden

The widget is hidden

elementID: string that contains HTML element id containing the widget

widgetID: string that contain the unique widget identifier

userID: string that contain the unique user identifier

WidgetClicked

The widget has been clicked/activated

elementID: string that contains HTML element id containing the widget

widgetID: string that contain the unique widget identifier

userID: string that contain the unique user identifier

type: string containing the type of widget clicked. It can have one of the following values:

“Chat”

“CallbackNow”

“CallbackLater”

“ClickToCall”

ChatStarted

A chat request starts

chatID: string that contain the unique chat identifier

userID: string that contain the unique user identifier

ChatOnline

The chat is active

chatID: string that contain the unique chat identifier

users: array of strings containing the identifier of the users participating in the chat

ChatFinished

The chat is ended

chatID: string that contain the unique chat identifier

userID: string that contain the unique user identifier

Message Structure

Type:
Status
titlejson

...