- Aug 19, 2002
- 595
- 0
- 0
I've been asked to do some web site analysis at work...basically our site has a navigation menu and the higher ups want to know what people have been clicking. The website gets about 14 million hits a month from about half a million unique IPs.
For the last month or so, I've been appending any menu URLs with a special tag, i.e.: mypage.php becomes mypage.php?tracklink=1. Every night, a scheduled awk script scans the log files looking for ?track, and I do some magic scripty things to insert it into a database from where I can generate upper management friendly charts and whatnot.
The only disadvantage to this method is that it's not live...I get reports only for the previous day.
I was wondering if it's completely stupid to log these clicks to MySQL as soon as they are clicked, instead of every night. According to the stats I've been running so far, there are about 7000 hits on the menu bar a day. I've attached some psuedocode below. So, is this completely crazy to do or what?
For the last month or so, I've been appending any menu URLs with a special tag, i.e.: mypage.php becomes mypage.php?tracklink=1. Every night, a scheduled awk script scans the log files looking for ?track, and I do some magic scripty things to insert it into a database from where I can generate upper management friendly charts and whatnot.
The only disadvantage to this method is that it's not live...I get reports only for the previous day.
I was wondering if it's completely stupid to log these clicks to MySQL as soon as they are clicked, instead of every night. According to the stats I've been running so far, there are about 7000 hits on the menu bar a day. I've attached some psuedocode below. So, is this completely crazy to do or what?
