in reply to Re^2: Tracking users clicks throughout an application
in thread Tracking users clicks throughout an application

Lots of devs have done it in Perl. I’ve done it in Perl and in JS. I’ve done lots of things that are easy to knock-out a decent prototype but cannot compare in the slightest to a professional package sustained by hundreds of thousands of users and teams of dedicated devs. For example, at work my old boss used to brag about how our site had 10 million page views a month via pure Perl tracking. I was very skeptical and insisted we try Analytics. When we finally started tracking it with a real tool it turned out that more than 9 million of the views were robots, spam bots, and spiders; and internally fired checks which were underestimated.

If you just want to track internal app usage and you are using code based on a framework with a central controller/dispatcher like Catalyst you can easily route internal nav information to a DB or flat file or whatever. Sessioning is not completely meaningful here as some clients don’t keep state/cookies. If your app is facing the Internet, the quality of your data will be low. If you’re doing internal/intranet and your site uses no rich content, you could be fine with this approach… depending on what you want to do with it.

So, what do you want to do with it? Where is it? What framework are you using?

  • Comment on Re^3: Tracking users clicks throughout an application

Replies are listed 'Best First'.
Re^4: Tracking users clicks throughout an application
by Anonymous Monk on May 06, 2015 at 17:12 UTC
    I forgot to mentioned that this tracking code will be for internal usage, I don't need to be so crazy about it.
Re^4: Tracking users clicks throughout an application
by Anonymous Monk on May 06, 2015 at 16:06 UTC
    Thank you!

    My framework is Perl. So you are saying do not use JS? What about CGI::Session? Have you done this in Perl?

      Perl is a language, not a framework. The main web frameworks in Perl today are Catalyst, Mojolicious, Dancer, with quite a few good fringe options like Amon2, and at least one decent historical (in my view) option, CGI::Application.

      With one of those, adding a hook at the top of the dispatcher to collect internal, non-JS, navigation info is trivial. To track JS you must use JS or have the JS call Perl tracking functionality. There is nothing wrong with using JavaScript.

      I advise use of Google Analytics because it’s easy and it works extremely well. You can roll your own, of course, but if you haven’t settled on a web framework and don’t know the differences between dynamic content, Ajax, and how it related to Perl then I think rolling your own will be a long and frustrating battle. I would only recommend it for fun and edification or an internal or private application.