Skip to main content

Best Practice: Measure Ticket Deflection

This page applies to:MindTouch Responsive

Setting up ticket deflection is only half the battle when it comes to understanding your inbound support requests. The other half is understanding how effective your ticket deflection actually is. To measure how effectively you are deflecting requests, you need to leverage custom event tracking in Google Analytics (GA).



In order to measure the success of your site's ticket deflection, you will need the following components set up in your MindTouch site:

  NOTE: Your form's Submit button must redirect to a "Thank You" page; tracking hits to this page determines if the ticket deflection failed.

Set up GA event tracking

The first step in being able to measure the effectiveness of your site's ticket deflection is to set up GA event tracking.  This will allow your MindTouch site to communicate with GA and pass over appropriate information when an event is triggered.  There are two parts to this:

Add event tracking

Add an event tracking code to the <head> of every page in MindTouch (don't worry, this is way easier than it sounds):

  1. From any page in your MindTouch site, click Site tools > Control panel.
  2. Under Branding, click Custom HTML.
  3. In the Page HTML Head, paste the following code (this JS snippet defines the event that GA needs to report):
* Function that tracks a click on an outbound link in Analytics
* This function takes a valid URL string as an argument, and uses that URL string
* as the event label. Setting the transport method to 'beacon' lets the hit be sent
* using 'navigator.sendBeacon' in browser that support it.
var trackTicketDeflect = function(url) {
   ga('send', 'event', 'deflect', 'click', url, {
     'transport': 'beacon',
     'hitCallback': function(){document.location = url;}

Add the GA event trigger parameter

To add the GA event trigger parameter, you'll first need to locate the form field that returns search suggestions (this is typically the Subject line). Inside of the containing div, paste the following parameter:

onclick="trackTicketDeflect(\'<%- uri %>?origin=d\'); return false;"

This snippet triggers the event when a search suggestion is clicked inside of the ticket submission form.

Set up GA goals

After you've implemented the code snippets to allow for tracking, you'll need to navigate to your GA dashboard to configure your GA goals. This will allow you to report on the successful and failed ticket deflections. Navigate to the Admin tab and select the analytics View for your MindTouch site. We're going to set up two (2) goals; the first goal will be the failed deflections, and the second goal will be the successes.

Failed ticket deflection goal
  1. Click the Goals tab (2nd one down on the list).
  2. Click +New Goal.
  3. In the Name field, type Ticket Deflection - Failed.
  4. Leave the Goal slot ID as Goal Id 1/ Goal Set 1.
  5. For Type, select Destination.
    • In the Destination field, keep the drop-down option at Equals to and type the URL of the Thank You page to which to route your users after they submit the ticket.
  6. Click Save.
Successful ticket deflection goal

To have GA report on successful deflections triggered in MindTouch, follow these steps:

  1. Click the Goals tab.
  2. Click +New Goal.
  3. In the Name field, type Ticket Deflection - Success.
  4. Set the Goal slot ID to Goal Id 2/ Goal Set 1.
  5. For Type, select Event.
    • In the Category field, keep the drop-down option at Equals to and type the word deflect in the field.
    • In the Action field, keep the drop-down option at Equals to and type the word click in the field.
    • Leave the remaining fields blank.
  6. Click Save.