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).
To measure the success of your site's ticket deflection, you will need the following components set up in your Expert site:
Your form's Submit button must redirect to a "Thank You" page; tracking hits to this page determines if the ticket deflection failed.
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 Expert site to communicate with GA and pass over appropriate information when an event is triggered. There are two parts to this:
Add an event tracking code to the <head> of every page in Expert (do not worry, this is way easier than it sounds):
<script> /** * 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;} }); } </script>
To add the GA event trigger parameter, you will 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.
After you've implemented the code snippets to allow for tracking, you will 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 Expert site. We are going to set up two (2) goals; the first goal will be the failed deflections, and the second goal will be the successes.
To have GA report on successful deflections triggered in Expert, follow these steps: