Help Center user segmentation using Google Analytics custom dimensions

35 Comentários

  • Ryan McGrew
    Ações de comentário Permalink

    Hey Dan!

    This identifier is actually a 1 way sha1 hash of the user id so you can't decrypt it. However, you could potentially user the email address in the user object for this. That should be a unique identifier for the user.

    You can also use the API endpoint /api/v2/users/me.json to get the current user information, including id.

    Thanks!

    0
  • Ryan McGrew
    Ações de comentário Permalink

    I just realized the below comment won't work. Please disregard

    ***

    I also just realized that we also have the user object in the template that you could use as well to assign a variable in JavaScript.

    *** 

    Thanks!

    0
  • George Panoschi
    Ações de comentário Permalink

    Hi, could anyone help me make a segment from a website that is not structured with " / " ?

    0
  • Bill Cicchetti
    Ações de comentário Permalink

    Resurrecting this article.

     

    So I am trying to create a custom dimension in GA for user role.

    1) I have GA activated and see out of box reports and dashboards populated.

    2) I added this to the script.js file

     

    //send user role to Google Analytics

    var userRole = HelpCenter.user.role;
    ga('set', 'dimension1', userRole);
    ga('send', 'pageview');

    });

     

    I went into Chrome DEV Tools and saw no errors.

    3) I logged into GA and create a custom dimension

     

    If this all looks correct  how to I add a criteria to a custom report to filter on end users?

    Do I need a specific value for dimension and filter?

     

     

    0
  • Chris Stock
    Ações de comentário Permalink

    Hi Bill Cicchetti, you're almost there. The final piece of the puzzle is to create a custom segment that uses the values recorded by your custom dimension.

    You'll see an 'Add Segment' box at the top of most of the GA reporting pages:

    Click on this, then on 'New Segment':

    Then select 'Conditions', under the 'Advanced' heading on the side-panel:

    From there you'll need to search for your custom dimension in the first conditional select menu (mine is called User Role, yours would be userRole):

    Change the operator from 'contains' to 'exactly matches', and then select the value you want to segment (i.e. end_user, anonymous, agent etc.).

    That should be all there is to it.

    0

Por favor, entrar para comentar.

Powered by Zendesk