views:

29

answers:

1

Hi,

Is there a way to track users of my site (based on Session ID's) using JQuery? I would like to know what pages and how long they spent on each page for example. Or any other suggestions are welcome. I had tried this with Google Analytics but I cannot seem to track individual users based on an ID.

GF

+1  A: 

jQuery & Javascript could gather the info on the client. But, you'd need something on the server to collect and store the data. You'd post to the server-side script with something like:

$.post("statsaver.php", { variable1: "value1", variable2: "value2" } );

Maybe you should look at an alternate stats package instead of trying to roll your own. Check out http://piwik.org/ or maybe http://haveamint.com/

skypanther