Search code examples
google-analyticsgoogle-analytics-filters

Google Analytics Advance filtering or segment picking specific pages


So I would like to only view certain pages in one explorer in google analytics how do i do so?

For example:

example.com/contact < (exact match and not anything beyond contact/example)

example.com/blog

example.com/how-to

I tried using segments with the conditions "exact matches" but what happen is that it still shows me all the pages that is not relevant to the above conditions when I view the segment on my behavior> site content> all pages.

And advance filtering limits to just "AND" even I tried using "matching regexp" with "/(contact|blog|how-to)" It still show everything after "/contact/example/example"

Any idea how to solve this issue?


Solution

  • Try to conclude your regex with $ (/how-to$), meaning "ends with the preceding character. GA regex is a bit overeager and assumes you want to match anything that contains your string, so you have to specifically terminate with the ends-with metacharacter.