Monday, January 4, 2010

Do not count my visits in GA - cookies

Here is a guide how to exclude your visits from GA (Google Analytics) statistics with help of cookies. If you have static IP address you can learn how to exclude your IP address in google analytics by clicking this link. In linked article you can also find do you have static or dynamic IP address.


This tutorial for excluding your visits in GA is simpler than most other tutorials you can find on Internet about same topic. Main goal of this article is to help blogger users to count off their visits from GA records.


Exclude your own traffic from GA records with cookies


  • First go to web page you track with Google Analytics

  • copy code below and paste this code in address bar of you browser (don't forget to click enter)

    javascript:pageTracker._setVar('DoNotCount');alert('Cookie has been created')


  • With this line of code in browser address bar you will create cookie for visited site with content "DoNotCount" or other if you change colored text. If you want to check created cookie visit my article Check cookies on my computer


  • now you need to create filter


  • In your Google Analytics click Edit

    Edit in Google Analytics

  • Click Add filter in the Filters Applied to Profile box

    Add filter in Google Analytics


  • enter filter name, for filter type choose Custom filter, choose Exclude. For filter field choose User defined. For field pattern enter same text you set in javascript we paste in address bar (colored text, in our example: DoNotCount)

    Custom exclude filter for cookie in Google Analytics

  • now you need to wait few days and GA (Google analytics) will no more count your visits. This guide was tested on my blog and it works.

5 comments:

ill66 said...

why do you have to "wait a few days"?

Mark said...

You can see GA records for last day, not in real time.
In my case a few day passed before I find my visit no more count in Google analytics.
You could try to ask Google why, in my opinion there are some technical reasons but I don't know why.

Ty Gardner said...

Hey Mark, so basically what I did was go to the add gadget option, and add the "Labels" gadget. I actually did this twice to set up my folders. To do the folders, it let me choose whether I wanted all labels to be added, or just specific ones, so I chose the specific ones and put that at the top. Then lower, I put in the same gadget, but told it to include all labels from my posts. Good luck!

Mark said...

Thanks on answer Gardner!

Unknown said...

I've tried this method in Firefox and Chrome and everything seems fine, the cookie is being set, my only problem is with IE8, that just doesn't set the cookie and i don't know why. It just doesn't make sense. Do you have any clue to why this is happening or in this case NOT happening?