Analytics
5.1K members online now
5.1K members online now
Ask questions about filter set-up and issues with using filters in Google Analytics reports
 
Guide Me
star_border
Reply

How to exclude visitors with userID from views?

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

On my website about 30% of visitors are visitors with userID (so registered users). I can easily get a view that contains only these users. I've done it by including all hits that have something (.+, for example) in their custom dimension userID. So far, simple.

 

However, I want to create another view that contains only those userst that DON'T have a userID. First I tried creating a regular expression such as  ^$ but with that filter I get no hits at all.

 

Then I created a new Custom Dimension called isUser which sets true (or "true" or 1, I've tried them all) if the user has userID and false if it doesn't. This I did because Analytics doesn't seem to send undefined custom events at all and I thought that could be the issue.

 

However, even with this new filter I get no hits at all IF I use 0 (or false or "false") but again I can include all my users with 1 (or "true" or true).

 

There seems to be something I don't quite understand. Is real-time view a good way to verify that my filters work as supposed eg. do they start to work immediately after I've created the filter?

 

I can verify that my custom dimension gets sent as it should with a view that contains all my data. However, the same custom dimension seems to be empty in the new view.

 

Any ideas? How would you exclude your users? I'm using GTM, too.

1 Expert replyverified_user

Re: How to exclude visitors with userID from views?

Rising Star
# 2
Rising Star
Hey Ottomatias,

Have you tried an exclude filter? Or are you only doing includes? Perhaps if you exclude true in your isUser cdim?

You are correct about custom dimensions though I always like to declare something with a boolean and not use the true flag only. If you set it for both, you should be able to filter either way; however, it may take some time to populate the dimension throughout your user base.

With GTM you could also create another tag (dual tracking) and send the hit to another property based on the value of your user variables in the dataLayer.

Best,

Theo Bennett
Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn

Re: How to exclude visitors with userID from views?

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
Hi Theo,

and thanks for the answer. Yes, I've tried both, include and exclude. I can now see with GA debugger that I'm sending a 0 in my Custom Dimension. I create a filter to include 0 (or to exclude anything but 0) - doesn't work. If I do it other way around (don't include 0), it works so that it doesn't include my visit but includes some other.
And when I say it doesn't work I mean it doesn't show a single visit in Real-time. One of my questions was that is this a reliable way to test the filter? Is there some kind of a delay or something?
We have about 20 different views if that has any effect.
I could of course add another tracking code, I'm just a bit worried about the performance implications. It should be a bit heavier operation because for a lot of users there's 2 tracking codes, instead of just 1, right?

Re: How to exclude visitors with userID from views?

Visitor ✭ ✭ ✭
# 4
Visitor ✭ ✭ ✭
And to make things clear: If I create a segment in my maste data-view with "IsUser == 0" I can get the correct segment. If I turn this into a filter, it doesn't work.

And yes, I've setup both, 1 and 0 (or true/false). However, it only works the other way around. I'm clearly either missing something or there is some kind of a bug in GA. I'd go with the former, but what is it?

How to exclude visitors with userID from views?

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭

So is there a way to create a fitler to exclude sessions with a user id?

How to exclude visitors with userID from views?

Visitor ✭ ✭ ✭
# 6
Visitor ✭ ✭ ✭

I'd like to know as well can someone please explain how to set such filter? 

 

How to exclude visitors with userID from views?

Visitor ✭ ✭ ✭
# 7
Visitor ✭ ✭ ✭

How I solved this issue was that I created a custom dimension, that gets updated on every hit. This custom dimension contains a value of 1, 2 or 3 depending on whether the user is a non-user, a user who signed up on this session or an user from the beginning of the session.

While it seemed a bit hacky at first, I actually think it's a good solution. Hope this helps!

How to exclude visitors with userID from views?

Rising Star
# 8
Rising Star

Hey @Ottomatias P ,

 

My apologies for missing your original reply!   Glad that you got it working and a filter created on the view level (so that you can use custom dimensions) should have worked for any value.

 

Cheers,

 

Theo

 

 

Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn