Under-appreciated feature: URL Search & Replace

WebTrends has a limited but extremely useful URL rewriter called URL Search & Replace, located in the Report Configuration list.   It allows you to change the URL in a log file line before WebTrends analyzes the line.   The interface is very logical.  Take a look at its setup screen – it’s worth knowing it’s there. 

Its uses are too many to list.  Examples:

  • Take a dedicated landing page URL and add the WT.mc_id parameter that you should’ve put there in the first place
  • Change “redir.jsp?url=othersite.com/whateverpage.asp” into “othersite.com/whateverpage.asp”
  • Remove the parameter “sessionID=whatever” from all URLs
  • (server logs) change an important image into a page file type, i.e. change “importantimage.jpg” into “importantimage.html” – then filter out all images

Here are the quirky things you need to know about it:

  1. It acts before everything else – before filters, content groups, everything.
  2. It does not actually change the log file line permanently.  The log is untouched.   It just changes the data immediately before WebTrends processes that line.
  3. It can only change one contiguous section of a URL.  You can’t change things in two different places of the URL.
  4. Only one URL S&R operation can happen per log file line.  If more than one definition applies to a log file line, WebTrends will execute the oldest one.  You can, if you want, play games by deleting (and re-creating) older URL S&R definitions in order to get them in the order you want.
  5. It works only on the URL, which in WebTrends means the path, filename, file extension, and query parameters — but NOT the domain name.   This is the single biggest mistake people make about it.  Of course, it goes without saying it cannot edit the referrer, etc. either.  Just the stuff in the URI and the Query fields of the log.
  6. In most logs, there is a space between the filename field and the query field.  URL Search & Replace sees that space as a “?” (just like in a browser address window).
  7. You cannot use regular expression operators or wild cards
  8. If you use the operator “replace to end of string” remember that you will also replace all the special SDC parameters.
  9. It does slow down analysis a bit.
  10. It helps tremendously if you open a log file to see exactly what URL S&R sees.
Be Sociable, Share!

2 thoughts on “Under-appreciated feature: URL Search & Replace”

Leave a Reply

Your email address will not be published.