We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13481
    • 97 Posts
    Sorry if this has been asked and answered before, but I can’t find anything about it on the forums. Is there a way to get reporting similar to the Manager Actions reports for Web Users?

    I simply need to know what pages my web users are accessing and when. I did notice that my web users show up in the Manager Actions report, but I can’t get any data to show for them, so I’m not sure if it’s a bug that they show up there, or if I just don’t know what action to choose.

    Please let me know if you know a solution to this.

    Thanks,

    James
      • 332
      • 23 Posts
      Hi, I too am curious about this...did you ever find out any new info? Thanx
        • 13481
        • 97 Posts
        Sorry, nope.
          • 4041
          • 788 Posts
          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
          }
          ?>
            xforum
            http://frsbuilders.net (under construction) forum for evolution