Google Analytics – how to exclude your traffic by cookie without creating files (like on blogs)
I have a blog (actually, I’ve had it on Blogger, which does not allow to upload files but images).
I wanted to monitor the traffic with Google Analytics, but myself-generated traffic introduced unwanted info in the statistics.
I could exlude my traffic by IP, but I have a dynamic IP, so…
I made it work using a filter:
Solution one (the official one, need to upload a file)
- Create a page (let’s name it ‘exclude.html’) in the website/blog and paste in that webpage the analytics code.
- Modify the body tag in this way:
body onLoad=”javascript:__utmSetVar(‘exclude_me’)”
This will set an Analytics cookie - Browse to that file from the browser[s] you want to exclude from statistics (that page should not be public linked)
- Create a filter (from Google Analytics) setting it this way:
Kind: custom
Exclude by filter: user defined
Pattern: exclude_me
Upper/lower case: no - You made it!
Solution two (setting the cookie manually, without needing to upload any file at all)
- Follow instructions of the first solution but set the cookie this way:
- View cookies in your browser of the website you are monitoring (if you use Firefox and Web Developer extension: “Cookies” > “View cookie informations”)
Cookies starting with __utm are Analytic’s one - Copy the starting id of the cookie, copy also the host
- Add a cookie (With Web Developer: “Cookies” > “Add cookie…”) with these parameters:
Name: __utmv (two underscores)
Value: [ID number you copied].exclude_me
Host: [as you copied]
Expires: [something like january 2999?, use the same syntax of other cookies!] - You made it!



Sei un figo!! Avevo esattamente questo problema!