StatTraq is one of the better statistics for WordPress blogs. Unfortunately Randy Peterman is no longer maintaining it, but Adsworth have patched a version which will run under WordPress v1.5 and 2.0 as well as fixing a couple of bugs.
I often forget the url to view my StatTraq statistics so I wanted to addÂ a link to itÂ in the WordPress Dashboard page. UrbanGiraffe showsÂ one method of adding a link as a menu item. I adapted this slightly to add the link as a submenu under the Dashboard, along with a link to Webalizer which comes with my webhosting service.
To add the links, edit wp-admin\menu.php and add the following lines right after the $menu=… line.
// Add StatTraq to Dashboard submenu
$submenu['index.php'] = array(__('Dashboard'), 'read', 'index.php');
$submenu['index.php'] = array(__('StatTraq'), 'read', '../wp-stattraq/statistics.php');
$submenu['index.php'] = array(__('Webalizer'), 'edit_posts', '../webalizer/');
2008/1/6 Update – A Better Menu
The above solution works toÂ some extent, but your changes to the menu.php file disappearÂ every time you upgrade WordPress. A much more satisfactoryÂ methodÂ is toÂ create your own plugin. Add the following to a file called my_menu.php and save it in your wp-content/plugins folder. Enable your new My Menus plugin then you should find a brand new set of links to your statistics pages under your Dashboard.
Plugin Name: My Menus
Plugin URI: http://mortell.blogdns.com/2006/10/22/wordpress-statistics-plugins/
Description: Add your own items to the WordPress menus
Author: D. Mortell
Author URI: http://www.dmortell.com
Â Â # Add sub-menus to the "Dashboard" page.
Â Â add_submenu_page('index.php', 'StatTraq', 'StatTraq', 1, '../wp-stattraq/statistics.php');
Â Â add_submenu_page('index.php', 'Webalizer', 'Webalizer', 1, '../webalizer/');