As I am sure you will agree users and sessions are probably the most important data points that make up your foundation web data, the next most important metric has got to be time. Time as a web analytics metric measures the time users spend on individual pages as well as the time spent on the website as a total during their session.

Not everyone knows how time on page or on the website is actually calculated. Believe it or not but time is more complex than you might expect, someone visits your website and requests your home page, this starts the users session. The user then decides to visit two more pages on your site, this results in a further two requests, the user then decides to leave the site, the image below illustrates what data we want to calculate for this users session.

  • Time on page (TP) represents the time spent on each page.
  • Time on site (TS) represents the time spent during that users session on the website.

There will be an entry in your weblog file that says a user has requested your website home page file at 12:00, the actual content of the file would look a little like that shown below:

Then the user navigates to a second page at 12:01, now you will have another entry in your weblog file for this latest request. The analytics program will now be able to calculate the time between each request, so now TP for the home page will equal one minute, this process then continues until the last page, when no more requests are made, your analysis platform will be able to calculate the TS, so if the user visits the third and final page at 12:04 the total for TS equals 4 minutes.