Mobile app version of vmapp.org
Login or Join
LarsenBagley505

: 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.

@LarsenBagley505

Posted in: #GoogleAnalytics

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.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @LarsenBagley505

1 Comments

Sorted by latest first Latest Oldest Best

 

@Heady270

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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme