Logging page dwell times in CakePHP
Posted: Mon Aug 13, 2007 7:15 am
Hi all,
Does anyone know a good way of logging the time users spend on each page of a site in CakePHP? My idea is to use $this->session->read() to provide the current session "time" element and use the write() method to place a retrospective element in the array that can be used to calculate time between pageloads. This works in theory, but I'm unable to test it because I don't know how to access the "query()" method from appController.
Has anybody done this? I'd like to avoid bypassing the databased abstraction by writing a raw query in appController.
Thanks in advance...
Does anyone know a good way of logging the time users spend on each page of a site in CakePHP? My idea is to use $this->session->read() to provide the current session "time" element and use the write() method to place a retrospective element in the array that can be used to calculate time between pageloads. This works in theory, but I'm unable to test it because I don't know how to access the "query()" method from appController.
Has anybody done this? I'd like to avoid bypassing the databased abstraction by writing a raw query in appController.
Thanks in advance...