Reputation: 41605
I'm using a filter in my Google Analytics configuration to prevent other sites to report views on mine whenever they use my Google Analytics code (which they do in fact...) I took the idea from here.
So, I'm using a "include only" filter that includes only stats coming from my site.
I'm now using a vendor platform which can be linked to my Analytics and I would like Google to include reports for the views or events that platform generates for my site.
Would it be possible to use two filters? One to "include only" and another one to "include X site" ? Are they exclusive?
Upvotes: 1
Views: 755
Reputation: 21
The field takes a regular expression. So if you filter by hostname you should be able to do an "or" - "hostA\.com|hostB\.com" - like in response above this. But you must remember that backslashes before dots are required to make it work correctly.
Upvotes: 2
Reputation: 32770
Two consecutive include filters will not work. Filters are destructive, and after the first filter has destroyed all non-matching data the second will have nothing to work on.
The field takes a regular expression. So if you filter by hostname you should be able to do an "or" - "hostA.com|hostB.com". I have to admit that I haven't tried this yet (and the filter preview gives and inconclusive result), but if it works it would be an easy solution.
If that does not work you can use a search and replace filter first - replace "vendor.com" with "vendor.yourdomain.com", include "*.yourdomain.com" and replace back the proper hostname after the include filter (this I have tried, although with directory names and not the hostname, and it worked beautifully).
Upvotes: 2