We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25551 ☆ A M B ☆
    • 1,231 Posts
    Hey folks,

    I was wondering if there’s a way to include a page counter in to MODx. I have tried one but it required SSI virtual includes which I understand is not usable with MODx. I would like to have a hits counter on certain pages so visitors can see how many times that page has been viewed.

    I have searched the forum but I can’t find anything.

    Thanks, Ross
      Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
      AugmentBLU - MODX Partner

      BLUcart - MODX Revolution E-Commerce & Shopping Cart
      • 27889
      • 415 Posts
      Just add a TV on your document and a plugin which increment this tv.
        MODx Sites & Prestations: http://dp-site.fr [Last MODx Site]
        MODx Repository: [HOME] [MetaTagsExtra] / Current Dev: [xFDM]
        • 25551 ☆ A M B ☆
        • 1,231 Posts
        Why didn’t I think of that! Oh yeah... I dono what you mean LOL. tongue

        Has anyone else done this to your knowledge so I can check out how they done it?

        Thanks!
          Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
          AugmentBLU - MODX Partner

          BLUcart - MODX Revolution E-Commerce & Shopping Cart
          • 24495
          • 407 Posts
          A bit off-topic: Why a (I think: visible) page counter? This is antiquated. For statistical purpose better use Google Analytics.
            • 3707
            • 241 Posts
            Will Page Hit Counter http://modxcms.com/Page-Hit-Counter-878.html do the job for you?

            It’s designed to display the page count through the manager but since it puts the document ID and count in a table, it should be easy enough to write a snippet to grab the count for the document being viewed. I used Page Hit Counter on a project then wrote a snippet to create a "most popular" list that displayed the document title and next to that the count for that document.
              • 25551 ☆ A M B ☆
              • 1,231 Posts
              It’s actually for a little project I have ongoing that users are able to create their own pages on my site and one asked if there was a way to tell how many people visited his pages. I thought that a hit counter was about the only way for a webuser to see the amount of hits. That’s why I can’t use GA or the page counter module.
                Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
                AugmentBLU - MODX Partner

                BLUcart - MODX Revolution E-Commerce & Shopping Cart
                • 24495
                • 407 Posts
                But you should check if the counter counts hits or visits! If it counts hits you can’t get the amount of visitors. Hits are the sum of the page itself plus any other object requested (images, style sheet files and so on). Do you have a counter that counts only visit(or)s?
                  • 25551 ☆ A M B ☆
                  • 1,231 Posts
                  All I want is a small box with numbers in it saying this page has been visted "X" amount of times... so the users know the page has been viewed "X" amount of times. lol
                    Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
                    AugmentBLU - MODX Partner

                    BLUcart - MODX Revolution E-Commerce & Shopping Cart
                    • 12684
                    • 118 Posts
                    Rossco,

                    I am doing something like you, however mine is more of a directory. I have been looking myself and I would love to have a counter for each of the members directory and then set it up where it will email the member when ever some one views their page, or at least send an email once a week or so to tell them how many visitors they had.

                    I use Statcounter for my whole site at the moment.
                      • 25551 ☆ A M B ☆
                      • 1,231 Posts
                      Quote from: IG88 at Jul 07, 2008, 08:27 AM

                      Rossco,

                      I am doing something like you, however mine is more of a directory. I have been looking myself and I would love to have a counter for each of the members directory and then set it up where it will email the member when ever some one views their page, or at least send an email once a week or so to tell them how many visitors they had.

                      I use Statcounter for my whole site at the moment.

                      That is exactly what I’m after... I’ll see how I get on with that! Thanks a lot.

                      Ross
                        Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
                        AugmentBLU - MODX Partner

                        BLUcart - MODX Revolution E-Commerce & Shopping Cart