I want to calculate the total active time of the user after user login in wordpress site.
For this i am using the following hook in my custom plugin:
add_action('wp_login', 'save_login_time', 10, 2);
Here i want to check weather the user is active(by mouse events and keypress events) or not.
If user is active, i want to calculate the time and if the time is greater than 2 minutes then i want to store that time details and save the data in another table.
I have no idea how i can put jquery on perticular hook.
I want you to give me an overview that how can i do this functionality in my site?