Hello! There is a task: you need to determine the time spent on the site for 7 minutes. If a user is on the site for less than 7 minutes, he is removed from the number only after 7 minutes have passed since the moment of his registration, if more than 7 minutes, he is newly registered as a new user. Guys, please tell me how to determine this time, which the user should stay on the site?

    1 answer 1

    I see only one way - to count 7 minutes on the user's side, for example, using js setTimeout (), which will send json a request to the server and register the user. Like this:

    setTimeout(function() { $.ajax({ type: 'POST', url: url, data: data, success: success, }); }, 7*60*1000) 
    • Understood, thank you very much for your help) - Ivan Ivanov