There are a number of events used that are generated and logged by Engagement Engine. These events can be used for a variety of reasons, such as auditing the behavior of Rules or integrating with third-party analytics solutions. These events include:
call-started: A Live Help Call channel communication between agent and visitor was initiated.
call-ended: A Live Help Call channel communication between agent and visitor was terminated.
chat-started: A Live Help Chat channel communication between agent and visitor was initiated.
chat-ended: A Live Help Chat channel communication between agent and visitor was terminated.
eeABStart: An A/B Test started.
eeAccepted: A visitor clicked on an invite.
eeClosed: An invite was displayed in a closed state, such as outside of a defined operating hours set.
eeCustomEvent: A custom event was logged using the Log Event Action on a Rule.
eeDeclined: A visitor clicked on the decline button or close icon of a displayed invite.
eeHidden: An invite should have been displayed in accordance with the Rule evaluation, but was suppressed due to a condition on the invite. The conditions that can suppress an invite are Agent ratio, Percentage Shown, number of Slots, Queue Wait Time.
eeOffered: An invite was displayed to a visitor.
eeRuleRan: A Rule was evaluated against the page loaded.
eeSuppressed: An invite should have been presented to the visitor as a result of Rule evaluation, but it was not displayed to the visitor as the Max Number of Invitations constraint had been met.
In order to track these events, each page on any customer-facing website should contain an always-true Rule with a Run Custom JavaScript Action. The easiest means of creating an always-true Rule is to create one that has no Conditions associated with it. This always-true Rule should ideally be called before any links are displayed to ensure that all relevant events are tracked correctly. This is to ensure that the event handlers are active on the page before the visitor moves on to another page.
An example of the JavaScript code that could be used for the Run JavaScript Condition is given below. This is a generic example that shows how to structure an event handler. For more specific examples of code, please refer to the Code Samples section of this chapter.
ATGSvcs.rules.analytics.launch({'poll-delay': -1,
'eeOffered': function(e, data) {/* process here */},
'eeAccepted': function(e, data) {/* process here */},
'eeCustomEvent': function(e, data) { /* process here - data.data contains the text used when logging the custom event */ },
'eeTransactionCompleted': function(e,data) {/* process here */}
});
In this example, you should replace the parts that say /* process here */
with the code you want to use in conjunction with your third party analytics software.
Note: Event subscription is cumulative. This means that if you subscribe to the same event multiple times, then, if that event occurs, you will get multiple log entries for the same event.
This example also specifies a poll delay value of -1. The poll delay value determines how frequently your system polls the Oracle servers for information about the events tracked for analytics. You can set this value to whatever value you feel is appropriate, bearing in mind the performance issues that may be encountered with a higher frequency of polling.
The minimum poll delay is 10,000ms, which is equivalent to 10 seconds. If you do not need to check whether a Live Help Call or Live Help Chat session has started or ended you should set the poll delay value to -1 in order to minimize traffic. This means that the server is not polled and all analytics are handled within the page. If no poll delay is specified, the poll delay defaults to 10,000ms.
Note: If you set the poll delay value in more than one place, the poll delay is set to the most recently specified value.