StatTraq admin link

Another technical posting…

I was looking for a way to obtain site statistics, and discovered the WordPress plugin StatTraq. It looked perfect in the screenshots, but unfortunately doesn’t work with WordPress 1.5. However, a nice hack is available at AdsWorth which does the trick.

By default, the plugin does not create any link to itself from the administration screen. A suggestion was made on the StatTraq forum, but again this doesn’t work for WordPress 1.5. It is very easy to adapt it though, and I’ve included the change here in case it’s useful to anyone.

Edit wp-admin/menu.php and find the following section (at the very beginning of the file):

$menu[0] = array(__('Dashboard'), 0, 'index.php');
$menu[5] = array(__('Write'), 1, 'post.php');
$menu[10] = array(__('Manage'), 1, 'edit.php');
$menu[20] = array(__('Links'), 5, 'link-manager.php');
$menu[25] = array(__('Presentation'), 8, 'themes.php');
$menu[30] = array(__('Plugins'), 8, 'plugins.php');
$menu[35] = array(__('Users'), 0, 'profile.php');
$menu[40] = array(__('Options'), 6, 'options-general.php');

Now add this line immediately after:

$menu[41] = array(__('StatTraq'), 10, '../wp-stattraq/statistics.php');

Simple! A link to StatTraq will now appear in the menu bar of the administration screen.

One thought on “StatTraq admin link”

Leave a Reply