Hide yourself from your own website’s Google Analytics using Firefox

The latest version of Firefox add-on Adblock Plus includes a useful new feature that is perfect for preventing your own visits to your website from appearing in Google Analytics.

If you use Analytics on your website(s) — particularly on very small sites such as this one, where your own visits can significantly skew any traffic measurements — you have probably wished you could reliably exclude your internal page views from your traffic reports. Google provides a filter system, but it falls a bit short if you aren’t visiting from a static IP address.

Aa great solution has just arrived in the form of Adblock Plus version 1.0.1, which finally provides the ability to restrict the domains to which its ad-blocking rules apply.

After installing the Adblock Plus extension, add a filter rule of the syntax


(replacing zoombody.com with your own domain). Now, when you visit your own site, you will remain completely hidden from Google Analytics.

You could undoubtedly apply this to other hit counters; Analytics just happens to be the service I use.

Run a Windows (“DOS”) batch/cmd script minimized

Here’s a snippet of code I wrote that will force a Windows batch script to run in a minimized window. Insert it at the beginning of the script:

if not "%minimized%"=="" goto :minimized
set minimized=true
start /min cmd /C "%~dpnx0"
goto :EOF
rem Anything after here will run in a minimized window

It works by having the script re-launch itself in a new minimized window. There are a few juicy batch scripting tricks in here that I recently picked up, like the %~dpnx0 syntax and the special :EOF label. And the overall flag/callback syntax is generally useful for creating self-contained batch scripts.

Other start switches besides /min can provide different parameters for the child window, such as adjusting the CPU priority of the resulting process.

Fix funky Samba filenames

While I was ssh’ed into my file server, I noticed that the files on my Samba shares were messed up — for example, “Béla Fleck and the Flecktones” would appear as “Béla Fleck and the Flecktones” — though everything was OK when looking at the shares as a client. After spending a lot of time messing around with code pages and character sets in my smb.conf, e.g.

   dos charset = CP850
   unix charset = iso8859-1
   display charset = LOCALE

I finally ran across an old mailing list posting that told me the secret: set my terminal to UTF-8 (to match the default character set of my Ubuntu server). Duh. I went into my PuTTY settings (yes, I was in Windows) and changed it from ISO-8859-1 to UTF-8. Muuuch better. Forget that smb.conf stuff.

Google Flu Trends: Do you use your powers for good or for awesome?

New from Google(.org) – Google Flu Trends:

We’ve found that certain search terms are good indicators of flu activity. Google Flu Trends uses aggregated Google search data to estimate flu activity in your state up to two weeks faster than traditional systems.

Now there’s an example of data mining we can all feel good about.

Via The New York Times. See also blog.google.org.