Blogs› CSS› Miscellany
How to exclude your visits from Google Analytics
Getting serious about stats
* I recently installed Google Analytics on my blog to track visits, gauge the popularity of different posts and portfolio pieces, and ultimately to track SEO efforts and site referrals.
Google analytics offers power for nothing
Being another free service from Google, you get a lot of power for doing next to nothing. The detailed reports are fascinating. You can easily track visit peaks and troughs against your own publishing activity, days of the week, etc. It’s really detailed and all the info is there. It’s really easy to install. Just follow the instructions on sign-up. All it takes is a single line of JavaScript to be present in every page of your site.
Skewed stats
A recent problem cropped up however. The more I use it, the more I don’t want to include my visits, particularly during heavy maintenance days when I upload more than one post (checking back and forth between my test pages and my admin drafts). So I began to think this week that there must be an elegant way to exclude any visits that I make to the site from whichever computer I may happen to use at work or at home.
A collegue suggested that I simply remove the call to the Google script on maintenence days. Not elegant, but would definitely avoid the skewing of stats that I’m currently seeing. But then, if I do a lot of maintainence, there’s quite a bit of work to manage this each time. It’s an extra step in a process that I need to be easy and simple.
I began to think that surely there is an easy way. My first idea was to set a cookie from whichever of the five browsers I use to check the site (IE 6 & 7, Win Firefox, Mac Firefox and Mac Safari). Failing that, there must be some way to include some sort of variable in url strings to say ‘exclude me’. I’m surely no the first one to have this problem.
Ad block extension
This seems to be a quick and easy solution. You just block the google script from your web browser. However, this has the effect of blocking all Google Analytics scripts from sites you visit. There are ways to make this work by tweaking it. This fairly good Ad block post shows what needs to be done. For me, this isn’t good enough as it is limited to Firefox, and I’ll be testing and viewing in any browser of choice.
IP address blocking
From within the Google Analytics admin tool, it’s pretty straightforward to add an IP address to exclude. However, this becomes a problem if you are being dynamically assigned an IP address by your ISP, or if you actually want to include any visits from colleagues at work, but still need to check or update your site during the day.
Cookie based approach to exluding visits
It seems that it is actually really easy to exclude your visits from the stats using a cookie. This is perfect, because I don’t want to exclude by IP (as even if that could be static, it would exclude collegues, and they are valid visitors).
Justin Cutroni’s Google Analaytics blog describes the process very simply:
1. Add a new filter defining a custom value inside the Google Analytics admin tool.
2. Use Justin’s cookie creator code; upload; enter your custom value in the form window.
To undo this, and include your stats, simply delete the cookie.
A full explanation can be seen in his ‘count me out post‘. I’ve added this to my site, and hopefully am already excluding my stats.
Ophira
Interesting to know.
29 Oct 3:46 am
Web Design Quote
Google analytical is the great tool to see the blog to track visit and the popularity of the post. This will help us a lot.
12 Jun 10:06 am