5.4K members online now
Understand information in your reports and troubleshoot reporting issues such as self-referrals, (not set) data, and inaccurate information
Guide Me

Create new Audience Segment for specific UserIDs

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭



Is there a way to create a new audience segment for specific users?  I am currently using the User ID feature and the "User Explorer" in GA shows the specific User IDs my website is sending.  However, I am interested in learning about behaviors of specific users (ex. User ID 1,2,4,5,9,10). How can I create a segment for these people? 


I tried advanced conditions as well but that didn't seem to work.  Please help. 



Re: Create new Audience Segment for specific UserIDs

Follower ✭ ✭ ✭
# 2
Follower ✭ ✭ ✭

Hi Ray,


I assume that you have already clicked on a single user ID shown in the Explorer Report and have already seen all the information that GA shows for an individual user... just to be sure I post a screenshot of this feature:

Schermata 06-2457561 alle 18.52.15.png


Concerning your question (i.e. create advanced segments that filters one or more user IDs):


as far as I know, the User ID is not a dimension that you can explicitly use in advanced segments, unless you have tracked this information in a custom dimension.


If you didn't, in order to create the segment you want, you need to implement an additional tracking, that stores the User ID in a dedicated custom dimension.


So my solution for your needs would be the following:

  1. on your GA admin --> property --> custom definitions --> custom dimensions, create a new Custom Dimension with "User" scope, e.g. called "User id"
  2. when the user logs in, track his User ID on the newly created "User id" custom dimension

Once this tracking code is implemented and you have collected some data, you can build an advanced segment that has a condition on the User Id custom dimension, to filter in all the user ids you want to analyze.


(notice: of course this will work only for data collected after the implementation of step 1 and 2).


I add some screenshots that may be useful:


(in my screenshot the "User ID" custom dimension is called "GA Client ID")


Creating a custom dimension:

Admin --> Property settings --> Custom Definitions --> Custom Dimensions

Schermata 06-2457561 alle 18.36.35.png


Creating the related advanced segment:

Schermata 06-2457561 alle 18.35.17.png


Schermata 06-2457561 alle 18.36.12.png


More on custom dimensions:


Hope it helps!




Re: Create new Audience Segment for specific UserIDs

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
Hi Gabriele,

I tried the custom dimensions before but I couldn't get it to work. Based on your response, it looks like it's user error. I'll try it again and will let you know in a few days.



Re: Create new Audience Segment for specific UserIDs

Follower ✭ ✭ ✭
# 4
Follower ✭ ✭ ✭
Hi Ray,


If you are able to properly set the custom dimension with the UserID, I think that it must work. Smiley Happy

So if it didn't work in your previous attempt, my guess is that the custom dimension wasn't properly set, or it wasn't properly sent to the GA servers.

You can check this using a debugging tool like Google Tag Assistant, and see if the custom dimension gets:
a) correctly populated for each user who logs in
b) correctly sent to GA servers, along with pageviews or event data.

Just as a reminder: the custom dimension code, that the GA panel gives you after the custom dimension is created, should be inserted before a GA "send" command (like send pageview or send event), otherwise the custom dimension doesn't get tracked.

For example, if you have an event for tracking the login action, you can place the custom dimension code just before the "send event" code.

Please let me know if you eventually succeed in making it working! Smiley Happy



Create new Audience Segment for specific UserIDs

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭

@Gabriele Rapino could you pls refresh the imagesSmiley Wink Im struggling with the configuration