views:

113

answers:

2

I need to create an analytics solution for a client. They have a large number of DOM manipulations through JQuery/Ajax. Besides making a call to a function for each DOM manipulation, is there any other efficient way to log DOM Events?

I need to log each DOM manipulation so that we can run analytics on that data. There are many instances where the site will display different data to the user but does not go out to the server, instead it is served up by manipulating the DOM.

Logging each DOM manipulation seems to be a costly (in terms of server processor) solution.

A: 

I'm confused by the mixing of "logging DOM Events" and "making a function call for each DOM manipulation". It would seem they were two separate things.

  • I retrieve some HTML to manipulate the DOM via an AJAX function call....
  • I log the manipulation conceivably somewhere? Why would we log the manipulation?
altCognito
I edited my original question to include more clarity to your question.
Bamerza
+1  A: 

jQuery doesn't have any logging built in. But you may be able to get away with using this:

http://ajaxian.com/archives/jquery-logging

And modifying your jquery.js file to log specific jQuery methods whenever they occur. It is not a perfect solution, but should help you track down the major problems or at least point you in the right direction.

Nick Berardi