We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 46886
    • 1,154 Posts
    Well, I tried Hits last night, and got nowhere. I even posted about it, and got no response.

    Its possible that Hits won't work with Discuss for whatever reason. I put the snippet into wrapper.tpl, by the way, which seemed to be the obvious place for it.

    Perhaps the concept of 'pages' is not applicable to Discuss, which is a collection of threads and posts rather than pages. Anyway, when no one jumps in with a bit of advice, that means to me that this is a dead end for now. The few instructions I could find were imprecise and so there is just too much uncertainty.

    So, its on to Hitspage! Hope I can get it working. Then to track clicks with google analytics.
      • 46220
      • 66 Posts
      I tried both of them and Hits did not work for me at all in combination with Discuss. HitsPage I did get it to work, I did not place it in the wrapper by the way. I placed it in core/components/discuss/themes/default/modules/post-sidebar.chunk.tpl and I did get a counter there increasing it with every visit. I did not get the values on the sidebar on non-Discuss pages. I ceased the activities as I do not want the most viewed threads, but most posts in threads.
        • 46886
        • 1,154 Posts
        Hi, it turns out that Discuss actually handles page views, at least in theory. Its in the DB, there is a value for this. Check out this discussion:

        http://forums.modx.com/thread/91723/db-schema-defines-page-views-createdon-but-how-to-access

        It could be as easy as putting [[*views]] [[*thread.views]], or [[*disthread.views]] or something related in the right place. By the way, sidebar is used with multiple threads, so its not super useful, it would be better at the thread level...or wait, maybe it tracks whatever thread that is, even though its in sidebar? Maybe...