How do I block my own visits in Google Analytics?

by 11 comments
I apologize if this has already been covered a bunch of times. Nothing I've tried so far has worked.

I am trying to block my own visits in Google analytics so I can accurately test conversions on my squeeze page.

I've tried setting a cookie in my browser, and then filtering out that cookie inside of analytics.

Tried setting the cookie in two different ways:

Here: (edit....won't let me post links since I'm a new member)

But my own visits still seem to be showing up.

Has anyone had any success blocking their own visits in Google?

Any advice at all?

Thanks very much!
Elliott
#programming #analytics #block #google #visits
  • Profile picture of the author AllanJames
    Just set up a filter to exclude your IP address. Check the Help for details - it's a wee touch complicated to explain here.
    • Profile picture of the author SetYourselfFreelance
      Originally Posted by AllanJames View Post

      Just set up a filter to exclude your IP address. Check the Help for details - it's a wee touch complicated to explain here.
      Ah if only it were that easy... Unfortunately, I'm on a dynamic IP. I also work on a laptop, and regularly work at coffee shops or a number of other places other than my home office... Tks anyway
  • Profile picture of the author Voon
    Alternatively after some googling.. (for windows)

    1. Open up c:\windows\system32\drivers\etc\hosts using notepad

    2. Append at the bottom and save the following:
    127.0.0.1 google's analytics domain (sorry can't post url)
    127.0.0.1 google's analytics ssl domain
    • Profile picture of the author SetYourselfFreelance
      Originally Posted by Voon View Post

      Alternatively after some googling.. (for windows)

      1. Open up c:windowssystem32driversetchosts using notepad

      2. Append at the bottom and save the following:
      127.0.0.1 google's analytics domain (sorry can't post url)
      127.0.0.1 google's analytics ssl domain
      Unfortunately (at least in this scenario), I'm a Mac guy...
  • Profile picture of the author SetYourselfFreelance
    Only pain in the butt is I have to wait a full day to find out if each thing I'm trying to fix works.. since it takes a day to show up in Google analytics... unless anyone knows any other ways.

    Thanks for all the help so far. I just joined WF.. Seems like a great resource
  • Profile picture of the author Voon
    Ops.. but good news! Mac has a hosts file too..
    Refer to <wikipedia>/wiki/Hosts_file (aww.. can't post url again =/)

    Look forward to hear some good news from you..

    p/s: welcome to WF.. and myself too..
  • Profile picture of the author SetYourselfFreelance
    Good news... I think I got it. As I said, it takes a full day to find out if what I changed took effect, but it looks like what I changed yesterday worked.

    It looks like Google added a new page (I'm sure it wasn't there before), about how to block your own traffic when you're on a dynamic ip.

    I'll add this here in case anyone else ever needs help with this....

    You just load a unique cookie into your own browser.

    To do so, you can add some javascript in the body tag of a page on your site that your visitors WON'T have access to (this is important because anyone who visits this page, won't get counted in your traffic reports).

    Code:
    body onLoad="javascript:pageTracker._setVar('unique_name_of_your_cookie')"
    Then in Google Analytics, just set up a filter to exclude any users that have this cookie set (you can find help on this inside of Google analytics). It's that easy.

    Anyone else that you don't want to include visits from in your analytics, just have them visit this page too, like VA's, employees, etc...

    And that's it. This seems to be the easiest way to do it.

    Hope this helps someone!

    Elliott
  • Profile picture of the author Voon
    Good info, thanks for sharing...

Next Topics on Trending Feed