• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

4. Measuring Web Site Usability > 67. Build Your Own Web Measurement Applicatio...

Build Your Own Web Measurement Application: Usability Data

Now that you’ve read up on usability data, it’s time to add average time spent on site and a report on the number of single-page visits to the mix in your homegrown web measurement application.

In this hack, we’ll continue our example logfile analyzer by adding statistics for the time on site [Hack #57] and the number of single-page visits [Hack #58] . With the infrastructure we’ve already built up, adding new reports is now easy. We just need to expand the Session and Data classes to include some new statistics.

The Code

The Session class needs to know how many seconds the session lasted. This is just the time between the initial and final requests. However, it’s worth noting that this doesn’t include the time the visitor spent on the final page of the session. It is possible to write a second piece of JavaScript that makes a request to the server when the visitor leaves the page, in which case you can measure the time spent on the final page. But we won’t cover that here. To add the code, you will need to append the code into the appropriate spot in each file.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint