Reputation: 133
I'm trying to set up what I believe may be an Advanced Filter.
I want to include all traffic to the m.mydomainname.com subdomain AND also include all traffic to the page mydomainname.com/my_page.html (note that it is on my main domain, not my subdomain).
I can't just do 2 include filters, because if I include all traffic to m.mydomainname.com then that will throw out the hits to mydomainname.com/my_page.html.
Does anyone know the filters I'd need to set up to create a profile which includes all traffic to a subdomain as well as traffic to 1 specific page on my primary domain?
Thanks so much.
Upvotes: 1
Views: 2207
Reputation: 7177
You need two custom filters:
For the first filter, something like:
Custom filter
Advanced
Field A -> Extract A: Hostname, (.*)
Field B -> Extract B: Request URI, (.*)
Output To -> Constructor: Custom Field 1, $A1$B1
For the second filter, something like:
Custom filter
Include
Filter Field: Custom Field 1
Filter Pattern: m\.mydomainname\.com|mydomainname\.com/my_page\.html
The second filter includes all traffic or m.mydomainname.com OR the single page mydomainname.com/mypage.html
When working with filters, it's a "best practice" to use two profiles:
Upvotes: 2