[TYPO3-dev] Nice page counter

John Angel johnange at gmail.com
Sun Jan 7 12:04:32 CET 2007


Hi,

I was looking for ext which makes nice page counter, which can be used for
"Most popular pages" feature.

System solution is using sys_stat extension. It does raw logging into
sys_stat table an the problem is that it becomes really huge soon. Thus it
doesn't provide aggregate information right away, but it requires time
consuming queries to get necessary data.

Actually, small table with one record per page id is enough, having
aggregated information how many views each page had.

I suppose it should be made with sys_stat-PreProcClass hook doing counting
of page views, instead of making raw inserts as sys_stat ext does.

Since sys_stat-PreProcClass hook works when sys_stat is installed only, to
avoid raw logging it is necessary to hack class.tslib_fe.php, to comment out
the line:

$GLOBALS['TYPO3_DB']->exec_INSERTquery('sys_stat', $insertFields);

Not so nice solution.

Another solution is post processing sys_stat table raw logs, every hour
using cron job, counting page views and updating another table with it.

Any ideas about the whole thing? The performance is the number one priority,
it should be the fastest solution.

Many thanks,
John





More information about the TYPO3-dev mailing list