Create a snippet with the code below and call it uncached in the bottom of your template.
ex: [!WebuserStats!]
Adjust the
$log->initAndWriteLog parts below accordingly, this is an example output in the manager actions table:
Username Action ID Item ID ↑ Item name Message Time
Breezer 58 12 WebuserStats Page view: Development 23-10-2010 05:28:13
<?php
if(isset($_SESSION['webInternalKey'])){
include_once "manager/includes/log.class.inc.php";
$log = new logHandler;
$log->initAndWriteLog("Page view: ".$modx->documentObject['pagetitle'], $_SESSION['webInternalKey'], $_SESSION['webShortname'], "58", $modx->documentIdentifier, "WebuserStats");
//$log->initAndWriteLog($msg, $internalKey, $username, $action, $id, $itemname); // write $msg and other data to log
}
?>