We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3319
    • 1 Posts
    Hello happy people,

    I was wondering if there’s a way (either one that I’m missing, or one that’s available as an addon...) to track your web users?

    Basically a client wants to see which pages his registered users are visiting so he can contact them with info based on their interests.

    Anyone know if this is possible?

    Thanks in advance for any help you guys can give.
      • 12941
      • 87 Posts
      Anyone? I was wondering about this too. My client wants to have a business directory and to see which people are viewing extended listings and export them into a CSV. It would be nice not to have to custom program this functionality as money is an issue, but at the moment I can’t think of any other work-around.
        • 32699 ☆ A M B ☆
        • 427 Posts
        Actually quite simple:

        Create a snippet / plug-in
        Create a MySQL table to catch the logs
        Load the snippet / plug-in at the top of each page

        Track the userid and doc id in the table.

        Create another snippet which provides reports...
          Get your copy of MODX Revolution Building the Web Your Way http://www.sanitypress.com/books/modx-revolution-building-the-web-your-way.html

          Check out my MODX || xPDO resources here: http://www.shawnwilkerson.com
          • 22840
          • 1,572 Posts
          Quote from: wshawn at May 25, 2010, 04:32 PM

          Actually quite simple:

          Create a snippet / plug-in
          Create a MySQL table to catch the logs
          Load the snippet / plug-in at the top of each page

          Track the userid and doc id in the table.

          Create another snippet which provides reports...

          Not really that simple if you don’t know how.

          This is something I would love to have but have no idea how to set it up, any chance of an example ??
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            I wrote a page hit counter some time ago that would be a good starting point; it consists of a plugin to load the database and a module to read it. It only counts pages hits, but it wouldn’t be a big deal to modify it slightly to log the user data.

            The problem with such a beast is that the database tables involved get really big really fast; if it’s not maintained regularly (perhaps written to file and then truncated at a specified record count) it can bog down a shared hosting site within a few weeks.
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org