An important aspect of the Aus-e-Stage project is that ability to see how much our services are being used and sharing this information with the AusStage community. To do this I’ve created an analytics section on the Aus-e-Stage website. The section currently displays two reports. The first is about the use of the Data Exchange Service, and the other is about visits to the Mapping Service.
To ease the administrative burden on project staff I’ve implemented a system whereby as much of the process as possible is automated. This includes the collection of the information, the generation of the report, and the display of the information on the webpage itself.
Exchange Data Service
I’ve written about the Data Exchange Service before. Put simply it is a website that allows members of the AusStage community to extract, in real time, information from the AusStage system and incorporate that information into a website. Each request creates an entry in a log file that contains information about the request such as the request and output types as well as when the request occurred. The exact information that is collected is outlined on the Data Exchange Service homepage.
I have written a Java application that is available from the Aus-e-Stage project hosted on Google Code. The application:
- Parses each log file, extracts the relevant information, and put it into an SQLite database using the SQLiteJDBC library
- Uses SQL to query the database to derive a number of statistics
- Writes an XML report file
The XML report file uses tags and a layout that I believe will be useful when the we start analysing audience participation feedback as part of the project later this year.
Mapping Service
I’ve written about the Mapping Service before. Put simply the service allows members of the AusStage community to visualise data held in the AusStage database using a variety of different maps. The current version of the site allows users to map events by organisation and browse a map of all of our venues. To track usage of this service we use the Google Analytics service.
I have written a Java application that is available from the Aus-e-Stage project hosted on Google Code. The application:
- Accesses the Google Analytics service using the Google Analytics API
- Extracts data on the number of visits
- Writes an XML report file
The XML report file uses the same tags and layout as the Exchange Data Service report.
Presenting the Report to the User
While XML is a good format for managing data it isn’t very end user friendly. To that end it is necessary to convert the XML into HTML. To do this I’m using a small and rather simple XSL Transformation. The transformation takes the XML report and converts it into HTML for display. You can see the results of the transformation by looking at the page on the Analytics tab on the Aus-e-Stage website.
The charts on the page are generated using the Google Chart Tools API. The URLs used to generate the charts are created tags in the XML report and the XSLT styles these as image tags for display.
By taking a little time early in the project to put these pieces of infrastructure in place now, lots of time will be saved in the future especially things really get going on the project. It also means that we don’t have to collate this type of information by hand. The entire process can be automated by executing these applications on the server and having them write the XML report files to a directory where the website can use the XSLT to transform into HTML when required.
The photo “Statistics Time is Coming” was uploaded to Flickr by the Newton Free Library and used under the terms of a Creative Commons License.
