Does anyone know how Google Analytics tracks how long a user has been on the site? When the user leaves the page that has analytic tracking code, won't the sending/receiving link be broken? How are they able to retrieve the last bits of information before the user leaves the page?
Here's an answer to that question from the Google forums
So I read that to mean that they measure the time from the first page view to the last page view, because they can't tell how long that page was viewed for.