Search code examples
phpanalyticsweb-traffic

Web traffic analytics


The site that I am working on creates user sites like (domain.com/user). We want to show the users some web traffic statistics relevant to their own site, like how many views from facebook, twitter etc. Can you guys please recommend a solution which we can integrate into our PHP/MySQL based system? Or is it better to build one inside the system ourselves using mangoDB or something similar?

Any pointers would be appreciated.


Solution

  • For preference, unless you are using SSL, I would recommend implementing the sites as user.example.com/ rather than domain.com/user - it's much easier to configure your webserver to write seeprate log files / most off the shelf web analytics packages will split a log file from multiple vhosts into reports per vhost.

    There's lots of tools available off the shelf - piwik, awstats, webalizer, analog

    Google analytics is amazingly good value compared to most commercial offerings.

    If you need to persist with your current naming schema, then consider using a too which relies on page tagging rather than log analysis.

    Or is it better to build one inside the system ourselves using mangoDB or something similar?

    I'd suggest that's very much a last resort - if you can't find what you need, then I'd recommend forking one of the open source packages.