Skip to main content
NICE CXone Expert
Expert Success Center

Integrate CXone Expert Analytics With a Support Ticketing Form

Applies to:
MindTouch (current)
Role required:
Admin
Self-Service and ticket deflection performance can be measured with CXone Analytics.

CXone Expert Analytics can keep track of how many users visit your ticket submission form and then go on to submit a ticket. Once this code is installed on your ticketing form, you can see how many of your users are self-serving on your site. These metrics can be viewed in the Self-Service Report.

Current implementation only supported on forms that are hosted in Expert sites. Future implementation options are currently under development.

Prerequisites

  1. Access to edit the ticket submission form
  2. Basic understanding of HTML code

How to set up analytic tracking on a site

Adding analytic tracking to an existing ticket submission form hosted on an Expert site requires JavaScript added to the page and may require a minor update to the form submit element.  

  1. Edit the page that contains the ticket submission form
  2. In the submission form code, locate the code that handles the case submission (Example: <input>"Submit Case"</>)
  3. Add a name attribute with the value submit to the submission (Example: <input name="submit">"Submit Case"</>)
    1. If there is already a name attribute associated with the submission, note the value to be used on step 6
  4. Create a new Javascript block below the submission form with the following code
    document.addEventListener('mindtouch-web:analytics:form-activity-logger-ready', function(ev) {
        var logger = ev.data.logger;
        var button = document.querySelector('input[name="submit"]');
        button.addEventListener('click', function() {
            logger.submit();
        });
    });
    
    document.addEventListener('mindtouch-web:loaded', function(ev) {
        var analytics = ev.data.analytics;
        analytics.initFormActivityLogger('case');      
    });
    
  5. If in step 2 the submission is not using an <input> and is instead using a <button>, replace input with button on line 3 of the Javascript
    Example: var button = document.querySelector('button[name="submit"]');
  6. If in step 3 there was already a name attribute associated with the submission, replace the name on line 3 of the Javascript to match this name
    Example: var button = document.querySelector('input[name="[new_name]"]');
  7. Save the page 

Events will start appearing in the Self-Service report the following day due to nightly data processing. 

  • Was this article helpful?