AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

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

Filter to exclude particular custom dimension value

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi all,

 

I wish to exclude all calls originating on pages that an automated test user is calling.

To achieve this, I have implemented the following:

 

1. On the web application, the GA call is as follows:

ga('set', 'userId', userId);
ga('send', 'pageview');

The tracking trigger works properly- I see the usage on the GA report as expected.

 

2. On Admin I added a new custom dimension called: userId, of scope "Session" (although other scope types didn't work as well)

 

3. On Admin I added a filter:  Custom-Exclude-Filter Field="userId"-Filter Pattern='999'

 

This doesn't work as expected- Application calls with the user '999' logged in aren't filtered.

I verified that the metric triggering includes the relevant custom dimension.
Example:
https://www.google-analytics.com/r/collect?v=1&_v=j47&a=######&t=pageview&_s=1&dl=https...&ul=en-us&...uid=999&tid=UA-#######-3&_r=1&z=#####

What am I missing?

Thanks!

1 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Omer G
December 2016

Filter to exclude particular custom dimension value

Rising Star
# 2
Rising Star

Hi Omer,

 

User ID has special meaning in GA and is used to ties cross browser sessions together in a special view.   You say you created a custom dimension also called user id but what you have in your example above is the reserved User ID.  You should be setting the custom dimension and looking to see if the custom dimension is set e.g. cd1=999 then filtering on that. 

 

From what you've laid out, it looks like you have not set the custom dimension but instead the user id.  You should have something like this:

ga('send', 'pageview', {
 
'dimension1':  userId
});


Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn

View solution in original post

Marked as Best Answer.
Solution
Accepted by topic author Omer G
December 2016

Filter to exclude particular custom dimension value

Rising Star
# 2
Rising Star

Hi Omer,

 

User ID has special meaning in GA and is used to ties cross browser sessions together in a special view.   You say you created a custom dimension also called user id but what you have in your example above is the reserved User ID.  You should be setting the custom dimension and looking to see if the custom dimension is set e.g. cd1=999 then filtering on that. 

 

From what you've laid out, it looks like you have not set the custom dimension but instead the user id.  You should have something like this:

ga('send', 'pageview', {
 
'dimension1':  userId
});


Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn

Re: Filter to exclude particular custom dimension value

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Hi Theo,

 

Thank you very much- it did the trick!

This is not 100% intuitive- I would have expected that the user needs to use the custom dimension name rather the dimension index.
i.e.:

ga('send', 'pageview', {
 
'PrivateUserID':  userId
});

 

Anyway, resolved Smiley Happy

Filter to exclude particular custom dimension value

Rising Star
# 4
Rising Star

Hi Omer,

 

You are welcome, enjoy!

 

Best,

 

Theo Bennett

Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn