Excluding subdirectories in Google Analytics
Currently, I use Google Analytics (gotta love the $0 price tag) to gather statistics on my web traffic. The default view shows you hits for your entire website including all subdirectories. Creating a view to see only a certain subdirectory (e.g., ”/blog/”) is simple. Create a new profile, edit that profile, and follow the Google’s directions for adding a filter to include only traffic to a subdirectory.
Excluding a directory from a profile isn’t explained, but I stumbled on to the solution on Google’s forums:
- Create a new filter
- Choose the filter type from the drop down box titled Custom filter
- Choose filter field titled Request URI
- Add a filter pattern like this ^/directory/ where the ‘directory’ is replaced with the directory you want to exclude
That’s it, but there are a few caveats. Filters permanently filter data. If you create a filter that excludes a certain directory, disabling that filter will not reveal past data about that directory. Filters are also only active starting from when you created them. So your data before that time will not be changed.