How To Keep Your Blogs Statistics Accurate
ADVERTISEMENTSEveryone who has a site check their stats from time to time to know how their site is performing. I know I check my site’s stats almost every hour.
I also check my site’s homepage and posts from time to time to ensure that there are no spelling mistakes and other problems like image not displaying properly.
But by doing this we are rendering our own stats inaccurate.
How to fix this
Almost every stats package you would try requires you to insert a little chunk of Javascript (or similar) into your template, usually at the bottom so it’s the last thing that loads.
All you have to do is tell your Content Management System (CMS) to not include that code if you are logged in. That way your own hits aren’t logged so your stats more accurately reflect how many visitors your site is getting and what they’re looking at.
For those of you who use WordPress this is very simple. The function that you need to let WordPress determine whether or not to include this code is the is_user_logged_in()
function. So your code should look like this:
< ?php if(!is_user_logged_in()) { ?>
Insert your stats package inclusion code here�
< ?php } ?>
This will work no matter where your code has to be included, and will work each and every time whenever you’re logged in.
via Jonic’s Blog
Search JohnTP.com or view a random post
Related Articles
Find out what I am doing currently by .
Posted on May 9th, 2006 | Category: Blogging, Tutorials |
Aaron Brazell
May 9, 2006 at 3:55 pm
That was a great article Jonic wrote. I saw it there the other day. One suggestion would be to wrap his content in
tags so readers know it’s an excerpt.johntp
May 9, 2006 at 4:16 pm
I have already linked to his post, which means the entire credit goes to Jonic
Keith Dsouza
May 12, 2006 at 9:11 pm
Hey John,
This tutorial is nice, I already have blocked my site with the inbuilt Joomla plugin to debar page hits counted from my IP since the day i started my site.
But still I have one doubt and don’t think the entire article is accurate as the user’s stats contain two things one is unique page hits and total page views and this article will definitely help with the total page views being inaccurate in your stats.
But i still don’t think this will help you in regards to unique user’s page hits as obviously unique page hits are accounted on different ips hitting your site.
I am already halfway through this new article to be published on my site tomorrow, a indepth analysis as to what your stats tell you.
Keith
johntp
May 12, 2006 at 11:02 pm
I was thinking of using this for Google Analytics until I found out it’s filter option.