1

I need help in setting up a traffic filter on Google Analytics. I want to include traffic from the following URI:

  • www.example.com/cc/ll/store/
  • store.domain.com

Traffic from different URIs must be excluded. As an example, www.example.com/cc/ll/news should not be in the results, as well as the main www.example.com home page.

What kind of filter should I use? My idea was to use "Include only" > "URI" and then use a regex to match the above but I need help on this.

1

I believe there might be at least a couple ways to do this (and honestly, I haven't tried this myself, so you will def have to test and see).

One way would be to first create a "hostname prepend" filter where you tack on the Hostname to all your URIs, and you would use an Advanced Filter to do this. After you have created this, you would need an Include filter on the Request URI with the following regex:

^(www.example.com/cc/ll/store|store.domain.com)$

Note that this would include ONLY traffic to www.example.com/cc/ll/store AND store.domain.com, nothing else. This filter MUST come AFTER the hostname prepend filter, since filters are applied IN ORDER, in GA.

And again, test, test, and test. I'm happy to help further, but as I said, I haven't done this before (or at least I don't think I have), so it might be correct, but worth try.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.