grungefreak Posted May 29, 2010 Share Posted May 29, 2010 Hi, I want to record the time each logged in user spends each web page of my site. I do not want to use google analytics but would prefer to use custom code or a jquery plugin. This time would then be sent to a database for analysis later. Any guidance would be great as I am not to good with javascript. gf Quote Link to comment Share on other sites More sharing options...
ignace Posted May 29, 2010 Share Posted May 29, 2010 <body onload="startRecording()" onbeforeunload="endRecording()"> start- and endRecording() needs to be defined by you. Quote Link to comment Share on other sites More sharing options...
grungefreak Posted May 30, 2010 Author Share Posted May 30, 2010 Thanks for the pointer. If i subtract timestamps I can get a value which is fine. The bit i'm unclear about is how I then store this in a variable for insertion into a database? GF Quote Link to comment Share on other sites More sharing options...
ignace Posted May 30, 2010 Share Posted May 30, 2010 The bit i'm unclear about is how I then store this in a variable for insertion into a database? Use Ajax to communicate with the PHP side to store the information. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.