webguru Site Admin
Joined: 07 Aug 2005 Posts: 19 Location: New York
|
Subject: How to create URCHIN Filters Posted: Wed October 08, 2008 |
|
|
As an example, I pose the following case:
Say you're building a website under Windows IIS and have several test scripts that you've coded. Now that you're ready to launch the Web site, you want to exclude or filter out all the files that were used for testing purposes.
Lets say you have the following test scripts that you were using and now want to filter out of the URCHIN reports:
- index_test.html
- contact_us_test04.html
- register_beta_01.php
- sample_junk.html
To exclude files/web pages from URCHIN reports, do the following:
- Click on Configuration -> Filter Manager
- On the top right, Click Add (+ icon)
- For Filter Name, enter an appropriate name, e.g "exclude test"
- For Filter Type, select Exclude Pattern
- For Filter Field, select cs_uristem (RAW)
- For Filter Pattern, enter (test)+|(beta)+|(junk\.html)+
- For Case Sensitive, select No
- Click Done
- Click More Options
- Select the the profiles you want to filter out listed under "Available Profiles" column and move them over to the "Applied To" column.
- Click Update
| Code: | () grouping (of operators)
| alternation aka OR
+ matches character to left one or more times
\ matches character to right literally |
So based on the above regular expressions, we have
| Code: | (test)+ matches any uri stem containing "test" one or more times
(beta)+ matches any uri stem containing "beta" one or more times
(junk\.html)+ matches any uri stem containing "junk.html" one or more times |
For more information about using regular expressions in your filters, I've created a regular expressions quick reference guide here http://www.webdesignsnow.com/forums/about122.html
IMPORTANT NOTE
If you've already setup your URCHIN profile, the filter will only apply to future reports. It does not apply to past reports already generated by URCHIN. To apply the filter for all reports, you need to delete and recreate the profile and log source with the filter applied to the log source.
PLEASE ensure that your server log files are intact before deleting the profile and the corresponding log source. |
|