Tracking User Interactions
Posted Saturday, February 25, 2006, at 12:06PM by Eric Richardson
One of the more interesting things (to me at least) that I did in the process of launching the new map application was add tracker calls in the database to reflect usage that normally wouldn't get reflected in the stats. I'm using Google Analytics for this, and I hadn't realized just how easy it was.
In the map application it's important for us to know about user interactions. How are people using the map? Are they doing searches? Are they clicking the map links to find buildings on the map? Are they clicking on the map to find info about buildings?
Some of these interactions occur entirely in client-space as communication between the Javascript and Flash. Using analytics, though, it was easy to add tracking on them. For instance, here's my JS code to load buildings details:
showDetails : function (id,from) {
Element.update(
'results_detail',
'<img src="/images/spinner.gif" '+
'height="16" width="16" alt="" '+
'align="left"/><p>Loading...</p>'
)
this.setResultMode('detail');
new Ajax.Updater(
'results_detail',
'/dtla/details?map_key='+id,
{asynchronous:true, evalScripts:false}
);
var log = (from)
? '/Details/' + from + '/' + id
: '/Details/unk/' + id;
urchinTracker(log);
},
To log where the user is generating the details call I add that from var. So a call from the map would be dtla.showDetails('405','map'); and would generate a hit to /Details/map/405 in my analytics logs.
Now if only analytics didn't have such a delay in stats showing up. For new sites, or cases where you've made new changes, it's rough to have to wait 24-hours to see the results.
Comments —
Eric Richardson lives in Los Angeles, California, and is generally interested in the intersection between technology, community and news.
He started blogdowntown, an online news site for Downtown Los Angeles, and today works in digital media for Southern California Public Radio.
On This Date
- 2010
- Untangling that stylish mess
- 2002
- Howie Day
- 1999
- Old News (from eNews)
