Google Analytics and Help Center - Part 3: Tracking customers' actions

Have more questions? Submit a request

44 Comments

  • Nigam Parikh
    Comment actions Permalink

    @Zendesk -,Product Team

    Reg,: Analytics/Tracking Click Results

    How to know how many Clicks done on each Help Center Questions/Articles on same page without creating separate URL for each questions?

    0
  • Brent
    Comment actions Permalink

    @Nigam - if I'm understanding you correctly, you're asking if Google Analytics can analyze how many times someone clicked on each individual article, which is possible. You shouldn't need any extra set-up. Here's a screenshot of it in Google Analytics to show you where to look: http://screencast.com/t/DVtAWZVqX

    0
  • Sandra Weigl
    Comment actions Permalink

    Hello. Regarding 'Where do customers give up and submit a ticket?', is there a way I can find out in GA how often users actually submit a request? Currently, it seems that as soon as someone clicks on the 'Submit request' button, the action is recorded which makes it difficult to analyse how many people do actually submit a request of the ones who have (perhaps accidently) clicked on the 'Submit request' button.
    Thanks!

    1
  • Andrew Dietrich
    Comment actions Permalink

    Hi Sandra! This is what I was able to come up with for tracking clicks of the 'Submit' button:

     // Track Submit button clicks
    
      $('#new_request footer input').on('click',function(e) {
        ga('send', {
      hitType: 'event',
      eventCategory: 'Submit Button',
      eventAction: 'Click',
      eventLabel: 'New Request'
      });
      });
    

    It isn't perfect - for example, it'll register an event even if the submission isn't successful - but hopefully it can get you started.

    0
  • Tony Roma
    Comment actions Permalink

    That's a good point, Sandra. The "Capture submit request event"/'Submit Request' would be better labeled "Capture initiate request event"/'Initiate Request'. Thanks for the code, Andrew.

    0
  • Claus Tjørndal
    Comment actions Permalink

    Those examples (still) looks broken. I’m unable to get them to work unless I update and use them as suggested by Dom.

    // Download tracking
    $('.attachments a').on('click', function(e) {
        var $this = $(this),
        path = window.location.pathname;
        attachment = $this.text();
        ga('send', 'event', 'Download', path, attachment);
    });

    Notice the “ga(‘send’...” command. It shouldn’t be an array, as perhttps://developers.google.com/analytics/devguides/collection/analyticsjs/events

    0
  • Charles Nadeau
    Comment actions Permalink

    You are correct, the ga() function no longer takes an array. The syntax in the article has been updated.

    Reference: https://developers.google.com/analytics/devguides/collection/analyticsjs/events

    0
  • Brittany
    Comment actions Permalink

    Hi there, 

    I tried copying this code but the events aren't being captured. I really know nothing about javascript -- am I meant to replace any of the code with page-specific information?

    Thanks!

    0
  • Jessie Schutz
    Comment actions Permalink

    Hi Brittany!

    I see you're getting help with this issue in a ticket. Please feel free to come  back and share your solution when you've got everything sorted out!

    0
  • Emma
    Comment actions Permalink

    The majority of the results I am seeing after having added the tracking of search events code are "(not set)." Even the search terms I am checking myself don't populate in the search events but I assume are being added as (not set). How can I make sure all the search terms are being captured?

    1
  • Rebecca
    Comment actions Permalink

    Hi Emma - 

    Interesting question here! To better troubleshoot this I would likely need to take a look at your Help Center and ensure the scripts for Google Analytics have been configured correctly. I am going to pull this into a ticket and will reach out to you soon!

    0
  • Steve Morrell
    Comment actions Permalink

    Is it possible to use the deflection tracking event to track when someone clicks on a suggested article, and also if they went on the submit a request in the same session?

    If one could record that someone was going to submit a ticket, but clicked on a suggestion, and then didn't, that could be taken a near-certain ticket deflection.

    0
  • Andrew Dietrich
    Comment actions Permalink

    Hi Steve,

    When an end-user is deflected from the article suggestions, they are sent there within the same window. None of our provided GA methods track the overall session of a user, only click events, so creating a 'link' between two different events wouldn't be possible.

    In looking at Google's GA documentation, there's the potential for session cookie tracking which might accommodate what you're looking for:

    https://developers.google.com/analytics/devguides/collection/analyticsjs/cookies-user-id

    0
  • David
    Comment actions Permalink

    Hi there, i

    Is it possible to reference the Google Analytics Client Id to find out which HC he is?

    0
  • Daniel Yousaf
    Comment actions Permalink

    Hi David,

    Thanks for your question!  I'm creating a support ticket with you, since exploring this may involve some questions about your account.  I'll be in touch soon!


    Thanks,

    Daniel | Customer Advocate - Tier 1 | support@zendesk.com

    0
  • Sue Ann Seet
    Comment actions Permalink

    Hello, I've copied the code in the JS section, but am unable to see the real-time events even after a few tries. are there any other possible reasons why I am unable to track on Google Analytics, the Events as described?

    0
  • Dennis Lynn
    Comment actions Permalink

    Hi Sue! It looks as though you have a support ticket open already, and our team is assisting with your specific code implementation. Generally speaking, however, so long as you are using this code and there is no additional conflicting JS, it should be fine. :)

    0
  • Nicole Nguyen
    Comment actions Permalink

    I was putting in the search events tracking code and it is NOT tracking any of my search events unless I change 

    {{search submit=false instant=true class='search search-full'}}

     to 

    {{search submit=true instant=true class='search search-full'}}

    in the homepage file. For that reason, the code listed does not work. It seems that even if you press Enter, that doesn't count as a "submit". You would need to set submit=true and then re-style the submit button as well as the magnifying glass search icon.

    If you don't want to do that, you can track when users press Enter to search with the following code:

     $('form[role="search"]').on('keydown', function(e) {
    if(e.which == 13) {
    var $this = $(this);
    var query = $this.find('input[type="search"]').val().toLowerCase();
    ga('send', 'event', 'ZD Search', 'Submit', query);
    }
    });

    Other suggestions:

    I'd love it if we could also have event tracking code snippets for top article suggestion search result clicks and show the link of the clicked article in Google Analytics (Instant Search is built with Zendesk custom elements that are not viewable so I do not have anything to select).

    I believe these would be helpful for everyone in having more insight into optimizing our Help Centers.

    1
  • Nicole - Community Manager
    Comment actions Permalink

    Hey Nicole - 

    Thanks for the feedback! I encourage you to re-post it in the Product Feedback topic in the Community so that our Product Managers will see it. 

    0
  • Grace Kim
    Comment actions Permalink

    Is there a way to track if someone searched in the Help Center and then instead of pressing "enter" on their keyboard, they clicked on one of the top suggested articles within the search bar? Right now, the code only captures if you fully completed the search by pressing "enter". 

    0
  • Nicole - Community Manager
    Comment actions Permalink

    Hi Grace - 

    That's probably a question for Google Analytics, but my guess is going to be that you'd need a third party tool like Pendo to track that kind of activity. 

    0
  • Brook Lenox
    Comment actions Permalink

    I'd like to set up an event that fires when someone clicks on "Yes" or "No" for "Was this article helpful?" 

    How do I do that?

    Thanks!

    Brook

    0
  • Nicole - Community Manager
    Comment actions Permalink

    Hey Brook -

    You would need to play with the code, but you could use a javascript listener to pick up on when someone clicks those, and then have a custom form or whatever you'd like show up.

    What kind of event are you trying to create?

    0
  • Brook Lenox
    Comment actions Permalink

    Hi Nicole...I was trying to create an event that would fire every time someone clicked "Yes" or "No" for "Wast this article helpful?".

    Then I could look in Google Analytics for our top 25 most trafficked support pages and understand which are helpful and which are not.

    0
  • Nicole - Community Manager
    Comment actions Permalink

    Hi Brook - 

    I checked in with some of our Guide experts, and they said that you should be able to achieve this with some javascript. We can't advise on the code specifically, but if you can find someone who's good at that stuff, you should be able to accomplish what you're trying to. 

    0
  • Andrei Kamarouski
    Comment actions Permalink

    Hi. 
    Is the code still valid? I am using it but don't see any events.

    0
  • Jessie Schutz
    Comment actions Permalink

    Hi Andrei!

    The code shouldn't have changed. Can you go into more detail about what exactly is going on?

    0
  • Andrei Kamarouski
    Comment actions Permalink

    Hi Jessie!
    I am pasting the code as is into script.js file of the theme and publish changes – but I don't see any live events firing when events-related actions are done. 

    0
  • Jessie Schutz
    Comment actions Permalink

    Hey Andrei!

    Can you be more specific about what code you're using? Are you using all the code snippets in this article, or just specific ones? What do you mean by "live events firing", just that an action is taken and doesn't show up in GA? How are you testing whether these actions are being taken?

    0
  • Andrei Kamarouski
    Comment actions Permalink

    I am just using code snippets from the article. This one i.e. for the ticket submission events tracking. 

    $('a.submit-a-request, .article-more-questions a').on('click', function(e) {
          var path = window.location.pathname;
          ga('send', 'event', 'Submit Request', 'Submit Request From', path);
      });

    Yes, I use most of them and I don't see any events in GA interface for this actions - real-time OR not. I am testing by doing these actions from my browser (tested from different computers). Could you check if the code is still valid? The guidelines for adding snippets to Guide theme look outdated (there is no more JS tab i.e. in this UI) - maybe code is too. 

    0

Please sign in to leave a comment.

Powered by Zendesk