Published on 2006-03-31 19:16:09
Objectives
There is many objectifs that we look for by making statistics : marketing, development of the application itself, making decisions … etc.
For example the marketer usually have some information which interest him/her and which he/she can use for selling goods, services … etc. These information are generally related to the visitor, especially the number of visitors, their origin, interests, how did they come and where did they go.
In the other side a developper need to know other detailed information in addition to the marketer for example the browsers used, screen resolutions, flash support, javascript support, Operating system, … etc. There is other information that should interest the developer and the designer to improve the usability of the application.
Let's take the case of commercial website with online store, and it's a technique that I have used before for an online store, which is to track the users that have filled an order and cancel it. Then we have tracked which products have been added into their cart, which ones have been deleted, and which ones have been ordered … etc. All these information then have been analyzed and we finished by changing the order forms and many issues in the website to make it better.
This is the kind of things that we can do with stats, but whatever marketer or developers, all have the same objectives to make the website better and generate more sales.
Identification
First it's interesting to identify the different aspect of tracking that we could have with AJAX applications :
1 – Content dynamicly requested : In this case the user hit a button or a link requesting data from server.
a- The data here could be loaded as the main content for example a simple dynamic pages of a blog, or an email … etc.
b- The data could be loaded in a secondary box, in a menu
In both cases it's interesting to track these requests as new pages since it's a data requested by the enduser.
2 – Content automaticly requested : In this case the application request data to update itself, for example an RSS ticker which request data every 5 minutes to refresh its news, or a webmail checking for new emails …
These cases could be considered as primary or secondary depending on the nature of the application. If the data requested are all what the application is using it could be considered as primary and so every request is a new page
Solutions
Classic statistical software don't give already excellent information for classic websites, to possibly use them with rich internet applications. So the idea is to create a strategy for stats while creating the application, for example to log every user requests and differ them from application requests.
Possibly store the requested parameters as urls since this will be considered as page view later, or giving names that could be easily identified.
There is many solutions then that could be used to generate graphs and tables to retrieve the relevant information from these loggued information and depending on the type of report that you are creating.
If you are using solutions such google analytics, I saw some developers making javascripts to let analytics collect information about AJAX requests. This is the easy way maybe to turn AJAX application into classic application for stats, but of course you have to consider also the limitation of the stats software that you are using.
Conclusion
We have already talked about the complexity that AJAX add to the development of web applications, but this is not a limitation since we can make a better web experience. Statistics is another issue that we didn't talked about very much, but it have to be considered during the development of the AJAX application to monitor this experience and help to improve it.
Member of the PHP Magazine Network, Copyright (C) 2005-2008 phpmagazine.net All Rights Reserved