Just a quick tip to remind you that if you use Google Analytics with a heavily Ajax driven site, you may want to update your code to track your Ajax requests. Google details this here:
How do I track AJAX applications?
I updated ColdFusionBloggers to add this code and did a bit of cleanup. Previously I had 4 different functions that loaded content into the main div for the site. There was loadContent(), which was called when you first hit the page, previous and next, called with pagination, and the search button. All of these used jQuery is .load() function to load a URL and then ran a callback function named cbfunc. (Yes, real imaginative.)
cbfunc took care of turning off the loading animation. I thought it would be a great place to handle logging the request with Google. Unfortunately, I didn have access to the URL requested from within the call back function. I could have rewritten the 4 main functions to do something like so:
$("#content").load(u, function() {
$("#loadingmsg").hide();
pageTracker._trackPageview(u);
});
That would have worked - but it felt like a lot of repetition. I added a new method to handle everything called loadDiv():
function loadDiv(theurl) {
$("#content").load(theurl,function() {
<cfif not structKeyExists(variables, "isiphone") or not variables.isiphone>
$("#loadingmsg").hide();
</cfif>
<cfif not application.dev>
pageTracker._trackPageview(theurl);
</cfif>
});
}
The iPhone check in there simply disables hiding the loading indicator for the iPhone version. The application.dev check simply blocks Google Analytics from running when I test locally.
Original Source:http://www.coldfusionjedi.com/index.cfm/2009/2/15/Use-Google-Analytics-and-Ajax-Remember-to-update-your-code
Related Stuff
-
MooV: Using cutting edge Video phones and Software Video Phones - coupling all that with VoIP and empowering the disabled.
-
Moo Telecom: VoIP communications made easy - Ring anyway with the fun and ease of using a normal phone
-
TagR:Mobile Social Network with Real Time Locations Based services, and Ambience Intelligence, VoiP, IM, Skype, Googletalk, Mapping, Flickr, Events, Calendaring, Scheduling, SecondLife Support
-
ClearSMS : ClearSMS is a Web-based application that lets you send bulk SMS messages to your customers, contacts, or just about anyone.
-
Jajah:jah is a VoIP (Voice over IP) provider, founded by Austrians Roman Scharf and Daniel Mattes in 2005[1]. The Jajah headquarters are located in Mountain View, CA, USA, and Luxembourg. Jajah maintains a development centre in Israel.
-
Skype: It’s free to download and free to call other people on Skype. Skype the number one voice over ip software
- PrivatePhone: a free local phone number with voicemail and messages you can check online or from any phone.
