Statistics For Your Blog

web_stats.jpgVisitor statistics should be the concern of every blogger, casual or professional alike. You can learn a lot about your site by knowing who visited when, what they were looking at and how they’ve got to your site. I review my site visit log everyday via AWStats, a very powerful and one of the most widely deployed traffic analyzing tool available on most hosting servers today.

If you are new to the topic, visitor log are essentially bits of traces left behind when someone visited your site. It can tell you:

  1. WHO they are - or more precisely the I.P. address of the visitors
  2. WHERE do they come from - the origin country can be discovered based on their I.P. address
  3. WHEN did they come - know which hour your site receive the highest hit rate in a particular day
  4. WHAT are they looking at - which particular page generated most traffic.
  5. HOW they have found you - whether through referral from another website, or search engine.

(Short of revealing WHY they were here)

Knowing these details can help you strategize your site in various ways, for instance:

  1. (WHO and WHERE) If main traffic is coming in from US, you can configure your advertising agent to serve to that particular part of region and achieve a more targetted listing.
  2. (WHEN) If site traffic normally peaks at 6am, you may want to schedule posting of content during that period so that new content can get highest possible exposure.
  3. (WHAT) If there is a sudden surge of interest on WordPress 2.0 that you have blogged about, you can focus on the topic to increase your site visibility
  4. (HOW) If you have received a lot of referrals from external sites, examine why is it so and try to repeat the similar effort.

Doing all these are not in vain. Our aim is to achieve the one very goal of expanding site traffic and if you play the card right, you may be rewarded with exponential traffic growth simply by blogging smarter.

Back to the topic of statistics for WordPress. With several wordpress installation under my care, I need something more flexible that allows the individual blog owners to access the statistics from within wordpress console itself. The usual place to start looking for any plugins are here at Codex. Under Statistics section, the two plugins worth mentioning are: wp-shortstat and wp-slimstat. Both seems quite well received by the community judging by the responses. Much like awstats, wp-shortstat presents all information in one screen whereas wp-slimstats partition information into the summary / when / what / who category. At the end I’ve decided on wp-slimstat for the more functional tabbing feature. I suppose all details in one screen may be a little overwhelming for bloggers who are less technical savvy.

wp-slimstat.png

The current revision (v0.9.2) is not without quirks. I’ve encountered several issues running the plugin. However, those are cosmetics and nothing that cannot be fixed in a quick patch. I have posted the code amendment to wp-shortstat as comment #306,#307 and #308. Here is it again for you r reference.

#1 Lots of database errors

WordPress database error: [You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ‘’ at line 3]
SELECT `tp`.`post_title` FROM `wp_posts` AS `tp` WHERE (1 = 1) AND `tp`.`ID` =

You see many lines of above warning message. This problem affect primarily those who use permalinks option. To correct this, replace all “$aFieldIndex” with “$aFieldIndex - 1″ between line 1686 to 1717 such as follow:
From
intval( $myFieldsList[ $aFieldIndex ] );To
intval( $myFieldsList[ $aFieldIndex - 1] );

#2 Activating Plugin

The plugin gets triggered everytime user activate any other plugin. To work around this, replace the code at line 3376
if (isset($_GET['activate']) && $_GET['activate'] == 'true') {with
if(isset($_GET[’plugin’]) && strpos($_GET[’plugin’], “wp-slimstat”)!==false)

Most of the time errors were attributed to the differences in environment setup. You need not worry a thing if your site do not exhibit any problem. Hopefully the author can quickly incorporate patches to the reported issues and post up a bug-free revision, at least for the benefit of new users who are not familiar with looking at PHP code.

Otherwise this is one analysis tool every blogger should not do without.


About this entry