Exclude your own visits from Google Analytics

by Joe on February 13, 2010

Share 

This solution doesn’t work with Google’s new (2010) asynchronous code snippet. I’m working on a solution.

If you’re doing frequent work on your website, there’s a good chance your biggest visitor is the person who greets you in the mirror every morning.

So?

parking garage mirror

Image by striatic via Flickr creative commons

So if you’re not excluding your visits from Google Analytics, you’re creating some crazy data.

Now, it’s a given that your analytics data is never perfect, but if you’re throwing it off by 1, 2, 5 or 10%, you’re not doing yourself any favors.

Luckily, there are several reasonably easy ways to remove your own visits from analytics.

I’ve got my favorite, which I’ll share here. It’s not the only way. For example, you can exclude by IP address. This works well if you’re always connected from the same place (like work). It doesn’t work too well for me, though, because not only can I not figure out my IP address, but I’m often working from home or coffee shops.

My choice is to exclude my visits based on cookies I set in my browsers.

Three steps:

1. create a filter to block your visits.

2. create a special web page to set a cookie in your browser (not as hard as it sounds).

3. visit that page in all the browsers and from all the computers you use.

Ready to dive in?

Watch this video, then open the sample html file and download the screenshots.

If you need a refresher on the settings they are:

  1. name of your choosing
  2. custom filter
  3. exclude
  4. dropdown to “user defined”
  5. pattern of your choice: no spaces or quotes/apostrophes
  6. not case sensitive
  7. add your profile to right hand box
  8. save

If this was helpful, please share it using your social media tool of choice. You might also want to sign up for my newsletter in the sidebar.

Questions? Ask them in the comments!

Please share this post with your favorite social media tool
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • LinkedIn
  • Posterous
  • StumbleUpon
  • Twitter
  • Print
  • email
  • Propeller
  • Reddit
  • RSS
  • Tumblr

SEO help from the ScribeSEO plugin. Check it out for yourself.

{ 17 comments }

Iain Gray February 14, 2010 at 12:57 pm

Useful tip – I’ve got excited before by the fact a visitor spent 3 hours on my site, only to find it was me when I checked the IP address.

Joe February 14, 2010 at 1:00 pm

Yes, and if you do have a static IP address, excluding your visits is a lot simpler. But few people I know both have one and know that they do, so I prefer this method.

Jim Evans February 14, 2010 at 1:53 pm

Useful tip. How do I find the cookie to see if it is there?

Joe February 14, 2010 at 2:49 pm

@Jim: I found it when I searched my cookies for the website name. In my browser I see a name column, which shows “_utmv” and then a value that includes the user defined value.

Eugen Oprea February 15, 2010 at 5:24 pm

I didn’t digged too much to find out that using a cookie will work better for me, so thanks for showing me this.

By any chance, do you know if it will exclude your earlier visits, too?

Really valuable. Thanks!

Joe February 15, 2010 at 5:27 pm

I haven’t figured out a way to block earlier visits yet. But I haven’t really looked. Too much trouble!

Jim Evans February 16, 2010 at 12:38 pm

Your PDF is damaged.

Joe February 16, 2010 at 12:47 pm

Thanks for letting me know. I’ve replaced it with a copy that works. I can email you a copy if your browser won’t get the new one (I had to switch browsers to test the new file).

Clesha February 18, 2010 at 7:20 am

Joe, thanks for this roadmap. I knew it was something I needed to do, but never took the time to find out how. You’ve saved me a lot of time.

Joe February 18, 2010 at 8:51 am

Glad it helped, Clesha!

Kathleen K. O'Connor February 20, 2010 at 11:43 am

Awesome, thanks for this post Joe! I am bookmarking this. I just set up GA and I need to get this done. I used it before and tried to block myself, but I guess I didn’t do it right because I still always saw my stats there.

Willie Hewes February 22, 2010 at 12:41 pm

Hey, nice tip, thanks! That’s really useful. Yeah, I get funny traffic spikes on weekends sometimes, and get all excited until I realise it’s because I was working on the site. Heh.

I could never have figured out this kind of cookie cleverness on my own. You’re a hero.

Pet Rabbit Care April 6, 2010 at 10:02 pm

Thank you so much Joe for this very easy tutorial. I was so confused after reading the Google Analytics help so it was great to come across this :)

I couldn’t seem to get the .zip file to download so just clicked on the link above the video and viewed (then copied) the page source code which worked a treat.

Thanks again!
Abbey

Joe April 7, 2010 at 7:18 pm

Thanks for letting me know about the download problem. I’ll look into it. Probably from changing servers. Glad the guide was helpful.

Jeff Small July 16, 2010 at 4:22 am

Aha. I think I may have solved my own problem, but I wanted to ask first.

I recently launched a new website, and installed analytics code by following the steps for creating a new profile. When I was adding your code above, the cookie would never get set, and upon further investigation discovered that it was generating an error.

Then I noticed a blog entry in the Google Analytics blog about the Asynchronous Code being released and noticed a link to the older code. When I clicked on the link for the older code, I noticed the “pageTracker.” object was in there and it’s not in the new asynchronous code (which was the error I was getting, “ReferenceError: Can’t find variable: pageTracker”)

Is there an updated version of this idea that works with Google’s new asynchronous code?

Joe July 22, 2010 at 9:21 am

Jeff– I haven’t installed the asynchronous code yet, but from your comment it sounds like it’s breaking my method. Ah, progress. I’ll work on changing the instructions once I work it out.

Sherry Ball Schoenfeldt August 3, 2010 at 5:38 am

thanks for this step-by-step . . . hopefully I’ll get it to work
it’s kinda surprising google doesn’t have a simple EXCLUDE ME button like statcounter and others do

Comments on this entry are closed.

Previous post:

Next post: