Filter your visits in Google Analytics (Do not track your IP)

Overview

Setting up Google Analytics to not track your visits is a bit tricky. You can filter by IP, but most of us are using dynamic IP so we need another solution. You’ll learn to setup a cookie on your browser and configure settings in google analytics to achieve this.

Instructions

Create Cookie

Read this! Important: Visit your site you track using google analytics,and paste the following line line to your browser address bar. You may need to retype javascript: at the beginning of the URL after pasting.

Don’t Forget to change the Unique Word

javascript:void(function(w){try{_gaq._getAsyncTracker()._setVar(w)}catch(e){try{__utmSetVar(w)}catch(e){pageTracker._setVar(w)}}alert(w)}('Unique Word'));void(0);

Where “Unique Word” should be a phrase known only to you..It can’t be seen by sites other than analytics.

If your unique word appears in a popup box, then the cookie has been successfully set.

You need to set this cookie in every browser you are browsing with.

Test if cookie has been set

To test if the cookie has been set. Go to any page on your web site that uses Google Analytics and paste the following into your address bar:

javascript:alert((/__utmv=.+?\.(.*?)(;|$)/.test(''+document.cookie))?RegExp.$1:'No unique word');void(0);

Remeber, you may need to type javascript: again after paste.

Your unique word will appear in alert. mean everything set.

 

Tell Google Analytics

  1. Go to the Google Analytics Filter Manager in your Profile: All Web Site Data (Web), and Click on New Filter.button
  2. Type any filter name you’d like to, select the Custom Filter option
  3. In the Filter Field dropdown, select User Defined (near the top of the list).
  4. In the Filter Pattern text box, type the unique name.

Wait several days to see changes.

1 thought on “Filter your visits in Google Analytics (Do not track your IP)

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.