Tuesday, April 14, 2009

Exclude your own Page Views from Google Analytics

If you have recently created a Blog and integrated with Adsense, you may be wondering why the PageViews or traffic are up on certain days and none on other days. The reason could be that those spike in traffic are coming from your own PC. Yes when you are adding new a post or verifying the layout etc all your page views are counted.

To exclude your own traffic from affecting the statistics, you need to create a filter and add it to Google Analytics. Google Analytics is a free service available from Google that you can use to analyze the traffic to your site. If you don't have a Google Analytics account it is very easy to signup. Go to your Blogger account, click on 'My Account' on the top and then click on 'Google Analytics' and follow the instructions to sign up.

After you signed up go to the 'Analytics Settings' and click on the 'Filter Manager' at the bottom. Once inside the Filter Manager page, click on 'Add Filter'. In the Add Filter you can add a filter to exclude an entire domain, an individual IP address, a range of IP address or a dynamic IP address.

Exclude an entire domain

Don't use this method to exclude your ISP domain (for e.g. comcast.com, att.net), as it excludes all the traffic from this domain (hundreds of thousands of users). For e.g. comcast.com domain may be used by all its customers.


Exclude a specific IP Address

This method only works if your IP address is static, i.e. the IP address do not change after you reboot your computer. If you are not sure check with your ISP. You can find your external IP Address by going to http://www.whatismyip.com/. The IP address like 192.168.xxx.xxx are internal IP address, given by your home/internal router, such IP address can not be used in this filter.

After you found your IP add it in the IP address field, but you need to add backward Slash(\) before all '.' in the IP address.


You can also use the above filter to exclude a range of IP address by setting the IP address field to '23\.12\.171\.57-60'. This range excludes all IP address from to

Exclude by Cookie

This is an advanced method, so if any of the above methods does not apply to you try this one. You can use this method to exclude all the computers in your home. First you need to create a new empty post in your Blog. Edit the post in HTML view (for Blogger go to Layout and click on Edit HTML), remove everything from <body> to </body> (also remove <body> and </body>) and add the following code in its place,

<body onLoad="javascript:pageTracker._setVar('exclude_by_cookie');">

Save the blog. From every computer that you want to exclude visit this new post. A cookie will be set in all the computers that visited this post (make sure your browser allow cookies to be set). Now create a new filter as follows.



No comments:

Post a Comment