I am trying to track visitors who visit my site. I use codeigniter to develop a site. I'm interested in tracking the last page visited until the webpage closes. Is there any way to do this?
What I was thinking about was to save my last page visited in the session, and then when they close the saving of information in the database. What happens when a user closes a browser or website (tab in a browser) or when he clicks on a link (on a web page) and redirects to another website? Does it send a request for a closed connection to the server?
What is the best way to track this?
I would also like to note that visitors are publicly available, and they cannot enter the site. I also use Google Analytics, but what to create custom for my site to get more accurate results.
source share