Google Analytics and Help Center - Part 5: Capturing Help Center user data Follow

Comments

15 comments

  • Avatar
    Dan Craig

    Thanks for posting this article, very helpful! Three questions:

    • Can we use the same js format to pass through other variables, such as organization or tags?
  • Avatar
    Jason Maynard

    Hey Dan,

    Answer below.

    #1. You can use either. Not sure if there is an advantage in using one or the other, but would love to know if you find out.

    #2. Oops! Don't do that :) Removed that section from the article.

    #3. Yep. The same format should be able to used to pass through any variable.

    Thanks for the feedback.

    Cheers,

    Jason

  • Avatar
    Carl Alingalan

    Hi Jayson Maynard,

    i have encounter a problem when capturing the user data, i followed every step that is in the article but doesn't show for me the User roles even the User Emails. it doesn't show any data

    please help me i'm stuck.

  • Avatar
    Jessie Schutz

    Hey Carl!

    Can you post a screenshot of the code you put in the JS editor? I'm not super familiar with JS, but my educated guess is that there's a problem there.

  • Avatar
    Micah Mount (Edited )

    Hello! I'm experiencing the same problem; if anyone can help me see what I'm missing I would be REALLY appreciative!

    I see user sessions in GA but am not seeing the user data for signed in users. And just to clarify--there have been signed in user sessions.

    We have the custom dimensions created and the JS in the Guide (see snippet below), then I set up a new Dashboard in GA to view the data, I see sessions elsewhere, but no sessions that are reporting the `user_role`

    GA custom report under Customization > Dashboards > New report:



     

    Here are the results from the Dashboard:

    Screenshot from our JS file in our custom theme:

     

    And here's the exact code that I pasted in:

    ```

    //Google Analytics User Data capture a la https://support.zendesk.com/hc/en-us/articles/204279766
    var dimensionValue = HelpCenter.user.role;
    ga('set', 'dimension1', dimensionValue);

    var dimensionValue = HelpCenter.user.name;
    ga('set', 'dimension2', dimensionValue);

    var dimensionValue = HelpCenter.user.email;
    ga('set', 'dimension3', dimensionValue);

    ```

     

    Again, any help would be GREATLY appreciated!

     

  • Avatar
    Tim Finney

    Hi Micah,

    I'm struggling with this myself, but one thing I noticed }); is missing from the end of your JS code. See screenshot below. I'm not sure if this solves your problem but figured I would point it out.

     

    Thanks,

    Tim

     

  • Avatar
    Micah Mount

    Hi Tim,

     

    Thanks so much for pointing this out. I had wondered about that, but as I'm not very familiar with JS I wasn't sure if the function needed to be closed there, or just at the end of the function.

     

    So far, I've had no luck with any of the tweaks I've tried, but I'll be sure to report back if that fixes things. 

     

    Thanks again!

    Micah

  • Avatar
    Tim Finney

    No problem.

    Zendesk- I'm having quite a bit of trouble myself with this and would appreciate any help.

    1. I created two custom dimensions: 'User Role' and 'User Name'
    2. I pasted the string listed in my previous comment into the Help Center. Can someone confirm if that looks correct? A few of my values are still in white which makes me think they are incorrect.
    3. Can you show us the report setting for the 'User names and emails' report you show on your dashboard?

     

    Thanks,

    Tim

  • Avatar
    Micah Mount

    Hey Tim,

    Try adding :

    ga('send', 'pageview');

    to the end of your script. This seems to have worked for me. I'm still working to verify that I'm getting all of the correct data; but now I am seeing at least some data in GA (whoot!).

     

    ~Micah

     

  • Avatar
    Tim Finney

    Thanks, Micah. Unfortunately, that hasn't made a difference yet. Could you possibly post your code and report settings?

     

    Thanks,

    Tim

  • Avatar
    Micah Mount (Edited )

    Hi Tim,

    Happy to. From what I'm seeing in GA the sessions report takes a day or so to populate though.

     

    JS in our custom theme:

    $(document).ready(function() {

    //Google Analytics User Data capture a la https://support.zendesk.com/hc/en-us/articles/204279766

    var dimensionValue = HelpCenter.user.role;
    ga('set', 'dimension1', dimensionValue);

    var dimensionValue = HelpCenter.user.name;
    ga('set', 'dimension2', dimensionValue);

    var dimensionValue = HelpCenter.user.email;
    ga('set', 'dimension3', dimensionValue);
    ga('send', 'pageview');
    });

     

    Custom report options under Customization > Custom Reports > New:

     

    Custom Report results:


     

    As I said, looks like data takes about a day to populate, and I'm completely new to GA so I'm not sure if this is the best way to view/slice this data, I'm just happy to see that we're starting to ingest it... now I can get someone who is more familiar with GA to set up any needed segments, reports, views, etc.

     

    I hope this helps you in your quest! 

     

    Best,

    Micah

  • Avatar
    Tim Finney

    Thank you, Micah! I really appreciate it. I'm finally seeing user data. I'm not sure what user data you want to see, but I'm most interested in seeing the email address of each user. So, I created the below report to show each user's email address and I filtered for 'end_user'. 

     

     

    Best,

    Tim

  • Avatar
    Jennifer Rowe

    Hi Micah and Tim, Glad you both got this sorted this out. Nice teamwork! :) 

    But I wanted to let others know that we did have some problems in our article. It's just been updated, so hopefully anyone else who comes along and wants to implement this won't struggle! 

    Thanks to Becca on our support team for the updated version!

  • Avatar
    Micah Mount

    Hi Jennifer,

    I really appreciate Becca's help--she was instrumental in getting data to populate in GA; appreciate the great support! And thanks for updating the article to include the suggestions she made--this will be really helpful for folks--thanks again!

  • Avatar
    Jennifer Rowe

    Glad to hear it, Micah! Thanks for coming back with the shout out to Becca. She is great.

    Glad she helped you solve your problem and was able to update this article for others!

Please sign in to leave a comment.

Powered by Zendesk