Advanced Customer Metrics with Google Analytics (Web Portal)

Note: This article describes the process of adding Google Analytics to your Web Portal. If you have Help Center (released on August 21, 2013), please see the following articles:

Setting up Google Analytics with your Help Center
Google Analytics and Help Center - Part 1: Asking the right questions (Guide for creating events to track specific actions in Help Center)

 

Google Analytics is one of the most useful tools available for those in the customer service industry.  What makes it even more amazing is that it is totally free! With Google Analytics, you can simultaneously increase the amount of data that you are able to capture, while also tracking where your customers are coming from and going to. You can even track what they are clicking on! Of course, this naturally means that Google Analytics and Zendesk are a match made in metrics heaven.

To get started with Google Analytics for Zendesk, sign in to Google Analytics, or create a new account by going to http://www.google.com/analytics/ and selecting "Create an account".

 

Once you're logged in, start the setup for tracking for your Zendesk by clicking 'Admin' in the top right, and then 'New Account' from the left-side of the new page.

 

Next, chose an account name, and then enter your Zendesk URL under Website's URL. You'll probably also want to choose your time zone and industry, then go ahead and accept the terms and conditions.  

Note: The data sharing settings are absolutely optional, although the With other Google products only option can greatly enhance your metrics experience if you have additional Google services (e.g., AdWords).

When configured as desired, click Create Account

Now, on the next screen, copy the UA code displayed near the top under Tracking ID. This is the last step you'll need to take within Google Analytics!

Now it is time to jump back into your Zendesk. Once there, if you are in Classic, navigate to Settings > Extensions > Widgets > Add Widget; if you're using Zendesk Lotus, select the Manage icon (manage_icon.png) from the sidebar, then select Extensions > Widgets > Add Widget.

Next, select 'Google Analytics'. 

Now, paste your tracking/UA code in the Web Property ID section of the widget edit screen. 

Note: If you use host mapping, please follow the link under GA tracker domain to see if you need to update this field or leave it as none, and follow the steps accordingly, otherwise leave that setting as 'none'.

Now, just save the widget by clicking Create widget and you should be all set!

Important! It can take up to 72 hours for data to start syncing properly. You can safely ignore the setting in your Google Analytics account that claims tracking is not installed. This setting will properly update (automatically) once data has started synching.

So, now that you have Google Analytics set up, you are probably wondering what you can do with it. With the Zendesk + Google Analytics widget installed, not only can you now determine whether your page views are from new or returning users, but you can also track mobile site visits, how many interactions your customers had with your site, and which browser/operating systems are being used to access your site. You can even determine which languages your visitors speak, how engaged they are with your site, and which pages they visited (and in what order they did so). This complements the forum and search analytics features in Zendesk and can help you to increase ticket deflection by promoting the articles that your customers visit most often.  

Google Analytics provides a stunning amount of traffic data that you can subsequently use to better serve your customers. 

Additionally, you can learn much more about the getting the most out of Google Analytics at the following links:

Have more questions? Submit a request

Comments

  • Avatar
    Caitlin Davies

    Do I need to use https:// when tracking my Zendesk website? 

  • Avatar
    Justin

    Shouldn't be required, Caitlin. 

  • Avatar
    Hagop Hagopian

    Can I track tickets clicks and view on Google Analytics?

  • Avatar
    Adam L.

    Absolutely, Hagop!  

  • Avatar
    Hagop Hagopian

    Amad, is there a link to the explanation on how to do that?

  • Avatar
    Adam L.

    Unfortunately, not from our side - I'd recommend going through their docs here:

    http://www.google.com/analytics/learn/index.html 

  • Avatar
    Dynamics Golf

    Hi, how would I add a tracking codes to every page which isn't Google Analytics i.e I have another solution which tracks traffic and customer actions.

  • Avatar
    Adam L.

    It totally depends on a number of factors.  For instance, what kind of code is it - Javascript?  If so, you could use a global javascript widget.  Any additional details you can provide would be much appreciated!  Thanks!  

  • Avatar
    Samuel Fewster

    Hi - is it possible to see figures on unique visitors that submit requests separately to UVs on the Knowledge Base?

  • Avatar
    Adam L.

    I'm not sure you can fully separate those, but you definitely should be able to see, on an individual level, which users ultimately submitted a request vs. which users simply visited the forums. 

  • Avatar
    Larisa Moore

    For some reason Google Analytics is only picking up site visits by our support agents. While interesting, that's not the data I really want to track. We do have a redirect set up for our site--i.e. customers go to a different URL and are then redirected to our zendesk.com URL. Would this affect the Google Analytics?

    Also, since we do have language specific forums, I was wondering if it is possible to specify locale-id when using Google Analytics?

  • Avatar
    Adam L.

    Hi Larisa,

    The redirect shouldn't really make a difference, but you can always track both locations, if you'd like.  

    However, I jumped into your account and noticed the Google Analytics widget is set to available only for 'people who have logged in, and are agents' - change that  (in the dropdown on the widget) to 'anyone including people who have not logged in' and you should be golden!

    As for the locale id, there's not a way to set that specifically, as far as I know, but if the widget is set properly, as described above, it should catch all that traffic and then you can break it down within Google Analytics to see forum-specific traffic!

  • Avatar
    Larisa Moore

    Oh! OK I thought that setting meant who could *access* the widget, not which users the widget tracks! I'll go change that now that I know. Thank you!

  • Avatar
    Adam L.

    Yep, understandable.  You should be set now, but let us know if you run into any further issues!

  • Avatar
    Marci Abraham

    Understandable mistake, Larisa! I'm actually glad you mentioned it, because I was about to do the same thing. @Adam, I think the instructions should be updated to reflect this. The example above (screenshot) shows the drop down with "people who have logged in, and are agents", which implies it should be left that way.

  • Avatar
    Adam L.

    @Marci

    Very good point!  Sorry about that.  Just updated it! 

  • Avatar
    Buck

    Hi - I'm obviously missing something because I followed the instructions and GA isn't tracking anything zendesk related. We already had GA active on our website, tracking visitors, clicks, conversions, etc. Following the zendesk KB article, I input our site's UA- analytics code as requested and finished the steps. That's all I should need to do, right? 

    We do not use zendesk for a forum or anything like that on our site. We use an embedded zendesk form as our "contact us" form to capture visitor questions and create tickest, etc. I need GA to know when someone submits one of those forms and add that bit of tracking info to that visitor's history on our site (basic GA stuff). But that's not happening, nothing is happening. Any ideas? (I have the 'users' set to anyone). Thanks!

  • Avatar
    Adam L.

    Hi Buck,

    How long has it been since you installed the tracking?  Does tracking show as active in your GA account?  Thanks and sorry for your troubles here.

  • Avatar
    Buck

    Hi Adam, I'm slightly confused by the wording "installed the tracking". All I did was follow the instructions above which, if you already have a tracking ID from GA, just involves entering the code onto the widget page and clicking "submit". Right? Is there an "installation" step that I'm missing? 

    "Does tracking show as active in your GA account?": not sure I understand what you mean by that. We use GA on our website, it tracks everything including purchases by our customers. What it doesn't show is anything having to do with zendesk. 

    Here's a screen cap showing our implementation of zendesk on our site: http://screencast.com/t/vmVPMKuJP6

    Let me know if you need more info from me. Thanks.

  • Avatar
    Buck

    Hi Adam,

    We inserted into the TAB's code, the code you provided in the block, verbatim except that we substituted our own UA code. We did this on Sep 5 and have been waiting to see if anything showed up in GA and nothing has. So I figured it was about time to follow up for some more help.

    A friend who knows a little bit about GA showed us how to look at the source code for the FORM that's generated by the TAB and there is nothing related to GA on the form - no GA script whatsoever, so we're not sure how it could be passing info to GA if there are no scripts on the form to do that.

    I've double checked and can confirm that the code that you provided IS within the TAB code on our site's pages. 

    Thanks in advance for your continuing help.

  • Avatar
    Adam L.

    Hi Buck,

    Just to verify, you substituted your own dropbox id, etc., right?  The info should be passed to GA by the code block (which should be tracking interactions within the tab) - I've verified it works on my side, so all that comes to mind is something such as dropbox ID being improper, etc. 

  • Avatar
    Buck

    Yes, we used our own codes. Here is the exact code on our site. The only thing I've removed is our domain and other identifying codes and replaced them with ***************.

    |  
    |
    |  
    | <!-- zendesk -->
    |
    |  
    | <script type="text/javascript" src=" [//asset0.zendesk.com/external/zenbox/v2.2/zenbox.js](http://asset0.zendesk.com/external/zenbox/v2.2/zenbox.js)"></script>
    |
    |  
    | <style type="text/css" media="screen, projection">
    |
    |  
    | @import url(//asset0.zendesk.com/external/zenbox/v2.2/zenbox.css);
    |
    |  
    | </style>
    |
    |  
    | <script type="text/javascript">
    |
    |  
    | if (typeof(Zenbox) !== "undefined") {
    |
    |  
    | Zenbox.init({
    |
    |  
    | dropboxID: "********",
    |
    |  
    | url: "https://**********.zendesk.com",
    |
    |  
    | tabID: "ask_us",
    |
    |  
    | tabColor: "#a7be16",
    |
    |  
    | tabPosition: "Left"
    |
    |  
    | });
    |
    |  
    | }
    |
    |  
    | (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
    |
    |  
    | (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
    |
    |  
    | m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    |
    |  
    |  
    |
    |  
    | })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
    |
    |  
    |  
    |
    |  
    | ga('create', 'UA-********-*', 'zendesk.com');
    |
    |  
    | ga('send', 'pageview');
    |
    |  
    |  
    |
    |  
    | </script>
    |
    |  
    | <!-- end zendesk -->
    |

  • Avatar
    Adam L.

    Hi Buck,

    I don't see any reason why this would work with mine, but not yours - the only difference I see is that you're using v2.2 of the tab, but the current version is 2.6 - otherwise can you verify if you see *any* data in the real time area of of your Google Analytics instance?

  • Avatar
    Buck

    Hi Adam,

    We have *NO* zendesk related data in analytics. The thing is that if you look at the form that's created by clicking our 'ask us' tab (even though we have inserted the code you gave us into the tab's own code), there is no GA code showing up on the FORM, so there would be no way for it to pass data to GA.

    When you look at the source code for the form generated by YOUR tab, do you see GA code in THAT FORM'S source?

    Can you provide me the code needed to replace the code we're using in order to move to the current version, or is it just a matter of typing "2.6" everywhere "2.2" is currently?

    Thanks.

  • Avatar
    Adam L.

    Hi Buck,

    For the version, you should indeed just be able to update any references to 2.2 to 2.6 or you can generate a new tab under channels > feedback tab.

    For the GA tracking - you were right - my method was flawed.  I did find a way to get this working, but just as my previous suggestion it's not officially supported (just as a warning).

    You can probably inject it into the CSS by editing your tab, clicking 'advanced customization' and then adding the following:

    </style>

    <script>

    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){

    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),

    m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)

    })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

    ga('create', 'UA-********', 'zendesk.com');

    ga('send', 'pageview');

    </script>

    <style>

    Just replace the code with your GA code, and then 'preview and grab code snippet, then replace your feedback tab code with the new code.

    I also removed the misleading info above - sorry for any confusion this might have caused. 

  • Avatar
    Adam L.

    I just wanted to emphasize, while this may hack work, it is not officially supported, so we cannot make any guarantees here.

  • Avatar
    Buck

    So that I'm sure I understand what just happened... you're saying that regardless of us updating the tab code to v2.6, adding the tracking code you suggested will NOT send data to GA and so we shouldn't bother continuing down that path and that you're looking for a way for us to do this. Did I get that right?

    If I did get that right, then the 2nd part to my question (not yet asked) is "ok, so it won't work with the TAB" can we get GA to work with the embedded zendesk created form on our Contact Us page - that's a form that's just sitting there all the time, waiting for inputs - not being generated by some other action (like clicking on a tab). Can you provide code that will send data to GA from within the form's frame? The problem is that our regular GA on our site tells us when people visit the page but we have no way of seeing in GA who/when/if a form is being submitted. And that's critical data.

    I'm having a hard time understanding why this is so difficult. It seems to me that GA tracking is standard operating procedure for everyone and every website at this point. We're late-comers to Zendesk. Surely this has already been solved. I need to track people with GA as they travel through my ecommerce site and that includes when they click on the support tab and submit a help ticket or when they use our contact us page and submit a ticket. This has got to be "standard", doesn't it?

    Thanks again.

  • Avatar
    Adam L.

    Hi Buck,

    I just created a ticket for you, so we can troubleshoot this - let's continue our conversation there!  Thanks!

  • Avatar
    Buck

    Definitely. Thank you.

  • Avatar
    Sascha A. Carlin

    Hi Adam, hi people

    I was looking into setting up a goal in Google Analytics to track the number of requests made by our customers.

    (It's simply more convenient to have that metric tracked in GA, because all our metrics go there.)

    I'd like to set up the goal as a funnel. The destination would be "/requests", and the only step in the funnel "/requests/new".

    Does that make sense to you?

    Thanks

    Sascha

Please sign in to leave a comment.