Google Analytics has powerful filtering functionality for users to easily segment their statistics to track views of sub-directories, sub-domains, traffic sources, as well as a multitude of other filtering options. These may seem confusing the first time you use them but once you understand how filters work you will find them a handy tool.
Filters are used to determine what data is included or excluded from a Profile. While a Profile is an analytics report that can have filters assigned to it. One very important item to understand is that if you apply a filter to a profile as long as that filter is applied any analytics data that doesn’t match your filter is not saved and once the filter is removed that data is still not going to show up for the period the filter was present. Therefore it is good practice to keep an original profile of a site available so that if you create a profile and accidentally filter out data you want you can always go to the original profile to search for that information not in your filtered profile.
That being said lets get on with the introduction to using filters. To begin with lets focus on how to create a profile. Once you have logged into analytics you view profiles by select an Account from the Accounts Overview page. Selecting an account takes you to the Account Detailed page where you can see all your profiles for that account. To create a new profile one would simply select the add new profile link. From the Create new profile page you are presented with the option of creating a profile for a new domain or for an exising domain. You would select new domain if you want to track a sub-domain and existing if you want to track filtered data such as views of a sub directory. Enter the requested information and you have created a new Profile.
To apply filters to a profile you select the edit link next to the profile followed by choosing new filter on the Profile Details page. In the Filters Administration page you can create a new filter or apply an existing filter to a profile. In our case lets assume we want to have our new filter track the sub directory /test/. To do this we would say new filter and give it a name. In the options we would choose predefined and select include > traffic to the sub-directories > that begin with and enter /test/ in the input field. Click save an you have created your first filter. Now when visitors come to your site their information will be saved in the original profile and if they visit the /test/ sub-directory of your site then their information will be stored in this profile as well.
That is all there is to it. You can of course create more advanced filters to exclude content or visitors from ip address, referral sites, etc. However the main items to know is that with filters any data that gets excluded from that profile is lost permanently and that it is best to keep a clean profile available in the case that you are adding new filters that you are unsure of and have the need to view excluded data.