AJAX...It's Not Just for Cleaning Print E-mail
Web Analytics
Written by Lyris HQ Staff Writer   
Thursday, 20 March 2008
logoajax.gifWe know what you're asking—Why is ClickTracks writing an article on cleaning supplies? Actually, we aren't. We are, however, going to spend a little time giving you the scoop on AJAX—an acronym that stands for Asynchronous JavaScript and XML—and what it has to do with web analytics.

To Refresh or Not to Refresh: That is the Question


AJAX is a programming methodology that has been around for many years, but has only recently gained popularity within the web development community. AJAX lets you develop web sites and web applications that behave like traditional compiled applications. What does this mean? Well, most web applications make use of forms—when the user clicks the submit button, they have to wait for the page to refresh while data is exchanged with the server. But by using AJAX calls, it becomes possible to send data from the client to the server through JavaScript and XML Server Objects. This creates the perception of a 'true' application because the page doesn't need to do a complete refresh. Individual data elements in the page can be changed and edited almost instantaneously.

Sounds pretty cool right? Well, it is. But before you all go out and buy an AJAX development book, there are some things you'll want to take into consideration. If you need accurate web analytics—and believe us, you do—you'll need to keep a few things in mind before developing your AJAX application.

Log Files or JavaScript: Which is Better for AJAX?


Since your pages won't refresh in the 'typical' matter, traditional page requests aren't being made, meaning that analytics data is hard to collect if you're using a JavaScript-based tracking solution. The nature of a JavaScript tracking solution is that every page or element you want to track must include a piece of JavaScript code that executes when the first page fully loads. If, for whatever reason the JavaScript tracking code doesn't get executed (like during an AJAX server exchange that doesn't cause a page reload), then that particular action won't get recorded.

On the other hand, log file based systems note both page requests *and* AJAX server requests. To better understand, let's take a look at a specific example:

index.html → user clicks on the products link → XML Server Object is accessed and data is passed to server → XML data containing product info is sent back from server → data is presented on index.html

In this example, if you used a conventional JavaScript tracking solution, only the request to index.html would be logged. However, in a log file based tracking system, both the request to index.html and the XML server object request would be logged. As a result, it would be possible to track which actions occurred, which links were clicked, etc.

It's important to weigh all the options when selecting an analytics solution. Both JavaScript and log file based tracking systems have their pros and cons, but if AJAX is your thing, having in place a log file based analytics solution should be a priority.

Comments (2)Add Comment
Lyris Professional Services Manager
written by Dan Miller, November 6, 2008
Karl, you bring up some very good points. It might've been better to say that a javascript-based analytics solution would typically need customization in order to accommodate AJAX. Simple data collection javascript only runs on page load, and the author was noting that the processing for AJAX is on the server side, where logging occurs but not javascript. However, AJAX can incorporate javascript functions that trigger the analytics tool to record data as if another page load has occurred.

The log-based side of the answer depends on the specific AJAX implementation, and I believe the author was simplifying to make this an introductory conversation. The page URL typically is the same with AJAX processing, but URL parameters can be appended to indicate what specific action is being taken. With ClickTracks log file analysis, we can easily parse those parameters to show specific activity.

Another very important factor to consider regardless of data collection method is interpretation of the data. Since AJAX actions are reported like page views, a site with a lot of AJAX being tracked will report large numbers of very short page views. So Average Time on Site will still be a good metric, but Pageviews Per Visitor and Average Time on Page will need to be taken with a grain of salt.
report abuse
vote down
vote up
Votes: +0
Director of Technology
written by Karl Persson, August 14, 2008
This article is completely incorrect, or at least incomplete to the point that it conveys the completely wrong message.

The writer assumes that any included JavaScript tag is only executed when the page first loads. However, instead by actually utilizing the AJAX functionality itself to add JS page tags for AJAX events, it is possible to track these events using JS.

Fact of the matter is that log-based analysis is NOT the answer for most AJAX applications, UNLESS every AJAX call requests a specific and different URL. This is not the case in most instances. Instead, your log-based analysis is going to have many requests for the same URLs with no way to differentiate the user actions.

On the other hand, by implementing specific JavaScript tags for certain AJAX actions you are able to, with fine granularity, track user behavior (including where they navigate on the page, buttons pressed, AJAX requests etc. etc.) which in many cases would not be discernible from log-file analysis.
report abuse
vote down
vote up
Votes: +3

Write comment
quote
bold
italicize
underline
strike
url
image
quote
quote
smaller | bigger

busy
 
< Prev   Next >

Lyris HQ Client Login

Flash Player Required

Lyris HQ requires the most recent version of the Adobe Flash Player, a free browser plug-in.

Get Adobe Flash Player.

Get Adobe Flash Player

Advertisement
Advertisement
 

LyrisHQ

Lyris HQ provides a single marketing platform for the integrated products today's digital marketer needs: email marketing, web analytics, PPC bid management, SEO, and web content management. Also included is a unified calendar, a message board, and a centralized reporting dashboard.

EmailLabs

EmailLabs provides leading email marketing solutions to over 500 customers worldwide. Beyond our advanced technology and unrivaled reporting & tracking, we also offer our customers access to email marketing expertise and consulting services.

 Visit EmailLabs

ClickTracks

ClickTracks' award-winning web analytics software uses a radically different architecture to offer intuitive, insightful analysis of Web sites, showing users statistics on their campaigns, site navigation patterns, PPC, SEO and ROI.

 Visit ClickTracks

HotBanana

Hot Banana is an award-winning Web CMS that helps marketers build and manage SEO-friendly Web sites that can be automated and optimized for maximum lead generation and conversions.

 Visit HotBanana

EmailAdvisor

EmailAdvisor is an email deliverability toolset that provides important information on a company's email campaign, including a preview of how emails will render, content analysis, blacklist and ISP monitoring, audit capabilities, and more.

 Visit EmailAdvisor

BidHero

BidHero is a web-based campaign management solution that allows users to easily set up keyword bids on multiple search engines as well as other ad networks through a single interface and automatically update those bids.

 Visit BidHero