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
    Hello all:

    I will provide links to my users, both to internal pages and external as well. And the users will not all be registered users, there will be guests.

    I need to track clicks of these links, so I know which ones are more popular. What is the best way to do this?

    I am thinking google analytics is the way to go, but wanted to ask if there is a better way?

    Thanks for any input!
      • 3749
      • 24,544 Posts
      One way to do it yourself is to add an OnClick() function to each link and have it call a JS function that uses Ajax to execute a PHP file that records the clicks.
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 46886
        • 1,154 Posts
        It looks like google analytics can do this as well, and that's an easier and probably more comprehensive solution. Its hard to beat those guys out unless you want a totally custom solution (and lots of programmers do haha).