Telling when a user has left your website

admin

Administrator
Staff member
Hi

I would like to know when a user has left my website. Is there a way of doing this in Javascript or HTML (or PHP even)?

At first I thought myabe onUnload might work, but that is invoked web the page is changed and in some cases the user may be going to another page on my website and therefore not really leaving the website.

Does this make sense? I want to know when they completely leave the website (or close the browser) and not just move to another one of my pages.

Thanks in advance

Martin
 
Back
Top