SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Addict
    Join Date
    Sep 2006
    Posts
    334
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Building A Stats App

    Hi all,

    This is a pretty cool stats app http://www.haveamint.com, was wondering would it be fairly hard to do? Not all the flashy/pretty stuff but the actual coding. I posted in here because it says you need PHP and MySQL to run it so I assumed it was done in PHP... Can anyone give me any feedback? I looked furhter into it and noticed it works by using JavaScript... Anyone know how it works?

  2. #2
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    An app like this works by analysing the web server's access logs. It's not something you can do with client-side JavaScript.
    Birnam wood is come to Dunsinane

  3. #3
    SitePoint Addict
    Join Date
    Sep 2006
    Posts
    334
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi AutisticCuckoo I thought that too but if you look here, they say that it can't track robots because it uses JavaScript... What do you think? http://www.haveamint.com/forum/after...iders_crawlers

  4. #4
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It means that the app uses client-side JavaScript to record some pieces of information that is not available through access logs. My guess would be things like monitor size and colour depth. They may also be using JavaScript and cookies to track a visitor as he or she navigates around the site.

    Client-side JavaScript cannot be used to build the stats app itself, though. When you visit a site, your browser has no knowledge of previous visits by other people. This has to be retrieved from the server logs, which are inaccessible to clients.
    Birnam wood is come to Dunsinane

  5. #5
    Caveat surfer Buddy Bradley's Avatar
    Join Date
    May 2003
    Location
    Cambridge, UK
    Posts
    2,366
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Mint uses JavaScript (and cookies) to send information on the visitor to a PHP script and then into a MySQL database. The backend stats are generated via PHP querying that database, but have some JavaScript/AJAX interface enhancements to allow you to perform dynamic queries without reloading the entire page.

    It wouldn't be particularly difficult to build something like that, if you have the PHP/SQL skills - I think the most difficult thing would be optimising the queries to cope with the massive amounts of data generated by a very busy site.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •