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

filter by subdirectory without trailing slash not working

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I have an angular app for which I have created an extra view with a filter. I want the filter to take traffic from just one folder.

The thing is that my url is for example http://localhost:9000/#/myfoldername?querystring=1

All the examples I have seen have "/foldername/"

So I tried include only traffic to subdirectory that contains "myfoldername"

That does not work.

 

Secondly I tried the custom filters to add a regularexpression like this .*\/myfoldername.*

Does not work. When I remove the filter all data is coming, so it is sending it, just not to my filtered view.

It is 

 

Re: filter by subdirectory without trailing slash not working

Explorer ✭ ☆ ☆
# 2
Explorer ✭ ☆ ☆
This RegEx:
\/myfoldername

Will match any of the following:
http://localhost:9000/#/myfoldername?querystring=1
http://localhost:9000/#/myfoldername
http://localhost:9000/#/myfoldername/

Really, it will match /myfoldername anywhere in the string

Re: filter by subdirectory without trailing slash not working

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
Yes, when testing the regex in regex tools I get a match but the filter in google analytics does not work for me when set up that way..or any way I have tried. But when removing the filter all data is sent.

Re: filter by subdirectory without trailing slash not working

Visitor ✭ ✭ ✭
# 4
Visitor ✭ ✭ ✭
HI Anna

If help is still needed, test the regex in the Pages report using the in-line filter at the top right of the data table
Use the Advanced link to ensure that it's currently in Matching Regex mode (the default)
That will show you which pages match the filter and which don't, based on the actual page names

If that doesn't help, we'll need a specimen page name and the filter being used