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

Capturing Category pages using Regex in Google Analytics

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I want to filter by category page only. I am struggling to exclude a second directory, is this possible in Google Analytics?

 

Want to grab:

first-directory

 

Want to ignore:

first-directory/second-directory

 

The first-directory doesn't have a trailing slash or an extension so I need the pattern to ignore the uri when it reaches a second forward slash /

 

Marked as Best Answer.
Solution
Accepted by topic author Cherie B
November 2016

Re: Capturing Category pages using Regex in Google Analytics

Explorer ✭ ✭ ☆
# 2
Explorer ✭ ✭ ☆
Hi Cherie,

Use include filter and "matches Regex" with pattern (without quotation marks): "^first-directory$". This way you will only see exact match. Using "$" at the end of expression assures that there can be nothing after that character or there will be no match.

Hope that helped.