Avoid loading PHP engine for each tracked click:
Every time a click is logged, PHP engine is loaded. This makes a little load as the script is light, but the server is really slow in send PHP answers compared to static files, as some benchmarks show: Lighttpd/mod_cml - PHP : 150 req/s, Static : 4900 req/s
A solution is to move ClickHeat calls (GET click.php?x=123&y=456) to a static file (GET clickempty.html?x=123&y=456), then parse the logfile of those static calls. This solution is brought to experienced users of Apache/Perl by wat.tv (partage de vidéos, musique et photos)
Use a static file as clickHeatServer:
clickHeatGroup = 'page';
clickHeatServer = '/clickheat/clickempty.html';
initClickHeat();
Then add a special log to your Apache's configuration (you can adapt this part to your needs, using cronolog or similar tool, a dedicated sub domain, etc...):
SetEnvIf Request_URI clickempty.html clickheat
CustomLog "clickheat.%Y-%m-%d-%H" "%r" env=clickheat
Finally you'll have to run the parseClickLogs.pl script included in the downloaded archive (located in /scripts/)
Könyvjelzők