Organic Search Engine Optimization (SEO) Solutions. Call now on 0879807629 or contact us via email
AKA Marketing.com Logo

Blogged thoughts, is our web blog. Expect views, opinion, rants and tirades about everything and anything 

« Home / Services / Forums »        

Subscribe to our SEO / IT related blog by entering your email address below

Blogged thoughts

| by the www.akamarketing.com team



Google Analytics - exclude your visits even with a dynamic IP

Hi folks, hope all my visitors from Ireland enjoyed the long weekend, I know I certainly did. Today I’m going to go through the steps which you need to do to have Google Analytics filter out and exclude all data from your own personal visits to your website even if you are on a dynamic IP. I visit this site a lot to check the blog and forums in particular so I do not want my visits artifically inflating my ‘real’ visitor data, if your site is generally static you will not have a need to visit it that often, so perhaps filtering out your own visits is not needed but only you can determine this.

Up until recently I did not know this could be done as since I’m an Esat/BT/IOL (or whatever they’re calling themselves thesedays) broadband customer I did not have a permanent static IP which I could use to identify my machine and thus exclude by IP, additionally I couldn’t filter by my network location which is ‘Ireland On-Line Broadband Customers’ as this would of course filter out visitor data for all IOL broadband customers.

The solution is then to use cookies as opposed to IP addresses, the overall idea is to set a cookie and then use the filter interface to instruct Google Analytics to filter out and ignore all assocated visit data from all machines which have this cookie set on them. To set the cookie you need to create a new page on your domain with the following code:

<body onLoad=”javascript:__utmSetVar(’no_report’)”>

Please note that this code is in addition to the Google Analytics tracking code that you have on every page of your website. Next you need to visit this page from all computers that you would like to exclude from your reports, to set the cookie on each machine.

The final step is to actually create the filter via your Google Analytics account. For this you will need to create an exclude filter to remove data from visitors with this cookie set. Follow the instructions at http://www.google.com/support/analytics/bin/answer.py?answer=27207&topic=2970 to create a filter with the following settings:

Filter Type: Custom filter > Exclude
Filter Field: User Defined
Filter Pattern: no_report
Case Sensitive: No

That’s it, to verify this is working correctly I recommend creating and visiting (a couple of times) a temporary page (say temp1.html) which has the regular analytics tracking code on it before you visit the page which sets the cookie, the next day in the content reports section in Google Analytics you can locate the hits to this page (which must have come from you as no one else knows about the page). After this, visit the page which has the cookie set code and then revisit temp1.html a couple of times, you should find no new hits to temp1.html when you recheck your stats the following day.

If you use multiple browsers you will need to visit the set cookie page from all them as they all store cookies in different locations. Any questions let me know.

12 Comments on “Google Analytics - exclude your visits even with a dynamic IP”
1| Richard Hearne said,

Thank God for static IP’s - so much easier :)

2| Ken McGuire said,

I run three stat packages across several blogs and sites but always wondering about blocking analytics… fair play!

3| Smarmy said,

Thanks for this write up. You were about 10 times clearer than the Google instructions.

4| Russ Barrett said,

I have followed the directions but it doesn’t seem to be working. I’ve built and visited a cookie set page with the javascript and tracking code. Then, built and visited a template page but it is still recording hits. The user defined filter is not showing up in Analytics either. I thought maybe I had not entered the Filter Pattern variable correctly. right now it is just: no_report. does it need quotes?

5| Sonia said,

Great that has thrown some additional light, in terms of testing if it’s working. Can I exchange the(’no_report’) for (’anything_no_report’) in order to minimise the potential of genuine visitors who have this cookie from another website? … Obviously providing I enter the same phrase into the filter pattern field in GA.

6| David Callan said,

Hi Russ and Sonia, thanks for commenting. I can only give out answers based on my own understanding of the situation and the fact that following the above steps is what worked for me.

Russ if this user defined filter is not showing up on Analytics well then it doesn’t matter about anything else. If nothing is filtered then of course everything gets through. I found it pretty easy to do myself, however I have uploaded an image of what things such be set up like to clarify for you more. It’s at http://www.akamarketing.com/images/excluding-visits.gif

Sonia, I think you can exchange ‘no_report’ for ‘anything_no_report’. In fact I’d be very suprised if you couldn’t. What your basically doing is setting a cookie variable called say XYZ and then from the Google Analytics interface your flltering out all hits from XYZ. Once the filter pattern and variable name match it should be fine. You should always test things though. Let me know how you folks get on.

Also how did you find this post?

7| Aaron said,

Thanks for the brief but clear explanation of how to block myself from the tracking. Google’s instructions cut off right after “Filter Field: User Defined” so it left me stumped on how to actually set this filter. Only thing I noticed is that Google’s code to set the cookie is different than what you have written above. Here’s what Google’s how-to page presented me:

I assume the Filter Pattern would be “test_value” instead of “no_report” unless that string is something that can be changed by the site owner while still getting the same result.

8| Aaron said,

Crap, looks like the code I pasted in was removed. Here’s the code again, sans html brackets:

/* body onLoad=”javascript pageTracker._setVar(’test_value’);” */

9| Excluding your own visits from Analytics reports - dave^2=-1 said,

[...] It turns out you can use some built-in Urchin functionality to set a cookie on your browser, which you can then use to filter out your own visits. Google also has some help with this, but the former link is much clearer and more complete. [...]

10| Chris said,

Thanks!!!!!! This is great.

11| Neil Parfrement said,

Brilliant!

12| Exclude your Traffic From Analytics Reports Using Dynamic DNS | PPC-Tech said,

[...] method for ignoring visits from your local network when you have a dynamic IP address.  There is a kind of hacky way for doing this that involves tagging the body tag on a page with some javascript that sets a cookie, then creating [...]

Leave a Comment
Name:
Email:
Website:
 
HOME | ABOUT US | CONTACT US | SITEMAP | GOOGLE SITE SEARCH | TOP
12 Lorcan Crescent, Santry, Dublin 9, Ireland +353 87 9807629