Firstly I should mention that I am aware of (and use some) statistics packages, however in this instance i want to write my own ulta-lightweight solution.
what i want to achieve:
- user visits a page
- once all content loading, parsing etc is complete, a request is made to .php file which increments a mysql db
what I'd like your thoughts on:
- best event to bind to when ALL content is finished loading? (ie doc.ready?)
- best jquery 'ajax' function to use to make this request?
I will store my hits in a separate 2 col table to the content (col1="page_id" col2="hits"), to prevent cache flushing
I should also mention that I am not looking to start a discussion on the 'value' of hits, I am simply interested in which jquery events and ajax methods to use...