facebook sdk

google tag manager

Wednesday, February 08, 2006

Web Analytics Testing: Excluding Your Own Traffic

Fiddler is an amazing tool. Written by the very generous Eric Lawrence (in his spare time), it allows you to see all HTTP requests and responses through your PC (via wininet). This is very powerful as it gives you a single tool to watch traffic to/from IE, Firefox and even your web analytics widget.

Not only can you watch traffic, but you can modify it as well. This is where it gets really cool, and very useful for testing functionality on your site. To illustrate this, let's say you were using Google Analytics, Measure Map and WebTrends to analyze the data from your site (purely hypothetical, I assure you ;-), and you wanted to browse your site without sending hits to those tools. Oh, and you really didn't want iTunes tracking your usage either. Here's what you'd do.

1) Install Fiddler
2) Select Rules -> Customize Rules...
3) In the editor, find the section "OnBeforeRequest"
4) In that section of the code, you'd add the following:

// Don't send Measure Map requests for site XYZ (XYZ is a number)
if (oSession.url.indexOf("/XYZ")>-1 &&
oSession.url.indexOf("tracker.measuremap")>-1) {
oSession.oRequest.FailSession(403, "Measure Map tracking", "Measure Map tracking");

// Don't send GA requests for site NNNNN-N
if (oSession.url.indexOf("NNNNN-N")>-1){
oSession.oRequest.FailSession(403, "GA Tracking", "GA Tracking");

// Don't send WebTrends requests for DCSID
if (oSession.url.indexOf("DCSID")>-1){
oSession.oRequest.FailSession(403, "WebTrends", "WebTrends");

// Don't send tracking information to Apple (actually 2o7.net) when using iTunes
if (oSession.host.indexOf("metrics.apple")>-1){
oSession.oRequest.FailSession(403, "Apple tracking", "Apple tracking");

Drop me a comment or email if you have any questions on this. It's a very powerful tool that provides a lot of additional functionality as well. Thanks EricL!

Filed in:


  1. Just testing the comments section (again!)...

  2. Testing comments...

  3. For you: Since you need to test your comments, I am putting this here. I think the problem is that the comments don't work with the feeds but they do on your blog site. I had to navigate here to send this.

    For me: Do you really think Fiddler works with Mozilla? The individual website needs to be in numeric form, right? And where does one find out the "name" of the analytics. (For example, how did you see that is was metrics.apple? tracker.measuremap?


  4. Hi Robbin,
    Fiddler works with Mozilla, but you have to have it configured to operate as a proxy. In Fiddler, go to Tools -> Fiddler Options. Configure a listen port and check 'Act as system proxy on startup'. Then configure Firefox to use that localhost and port as its proxy.

    Hope that helps,



webtrends reinvigorate analytics