I have been working hard on a new site, and having put Adwords up I no longer want to see my hits on the Google Analytics reports because it all just gets in the way. Analytics gives you 2 ways of excluding traffic using the filters. The first is by IP Address, and the second is to set a cookie with a predetermined value, and filter on it. You can use the Google Analytics regular expression generator to help you create an IP address filter. This generator can convert one IP address to a simple regular expression, or it can generate a regular expression to match a range of IP addresses. IP Address is all very well, but what if you use a number of different machines, at home / work / airport etc? Well – setting a cookie is a good way of doing it. So far though all the tutorials I have seen suggest making a blank page, and adding some code to it to set the cookie. Why?
It means you have to remember the URL, and worse remember to visit the page first before you get on with your work. So first the code, on a page that also has your regular analytics tracking code:
Then you create a filter in Analytics > Profile Settings > New Filter Filter Type: Custom > Exclude Filter Field: User Defined Filter Pattern: AdminUser
This method, to my mind is better than some other tutorials out there, and even Google’s suggestion if you code and have the knowledge. Not only do I now not have to remember to hit a page, I don’t need to know the URL and there is no superfluous html page floating in my webroot. I simply login and it starts ignoring me if I am an administrator. Read more here: How do I exclude my internal traffic from reports?