: Google Analytics filter with OR operator I need to build a Google Analytics filter that includes all traffic from a selection of subdirectories, in my case all that start with customer and company.
I need to build a Google Analytics filter that includes all traffic from a selection of subdirectories, in my case all that start with customer and company.
You can see my configuration below, but the basic pattern is this:
/customer|/company
According to the Google help file one should be able to pipe together multiple patterns: support.google.com/analytics/answer/1034832?hl=en
But this clearly does not work. Any idea how to achive this?
Update:
I've tried @nyuen suggestion, but getting zero visitors like this. Do I have to switch to a custom filter?
Solution:
Customer filter with include was the solution.
More posts by @LarsenBagley505
1 Comments
Sorted by latest first Latest Oldest Best
There are a couple of issues that I immediately see:
Subdomain is not the same as subdirectory. A subdomain looks like company.domain.com or customer.domain.com. A subdirectory looks like domain.com/customer or domain.com/company.
If you are talking about subdomains, then you should use a regex match on a hostname of (customer|company).domain.com. If you are talking about subdirectories, then you should use a regex match on a page path of /(customer|company)/.*.
Note that you can't use the begins with match type with a regular expression as you have in your example.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2025 All Rights reserved.