Index: googleanalytics.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/google_analytics/googleanalytics.js,v
retrieving revision 1.3.2.8
diff -u -r1.3.2.8 googleanalytics.js
--- googleanalytics.js	4 Mar 2009 07:25:47 -0000	1.3.2.8
+++ googleanalytics.js	20 Jun 2009 01:38:51 -0000
@@ -1,9 +1,18 @@
 // $Id: googleanalytics.js,v 1.3.2.8 2009/03/04 07:25:47 hass Exp $
 
-Drupal.behaviors.gaTrackerAttach = function(context) {
+$(document).ready(function() {
+  // Attach an onclick event to body tag. Clicks on links will "bubble up".
+  // This approach is more efficient than attaching to each link, since
+  // all the links can share one handler.
+  $('body').click(function(e) {
+    var $link = $(e.target).andSelf().parents('a:first').filter('a');
+    if ($link.size() != 0) {
+      googleAnalyticsClick.apply($link.get(0));
+    }
+  });
 
-  // Attach onclick event to all links.
-  $('a', context).click( function() {
+  // Click handler for links.
+  function googleAnalyticsClick() {
     var ga = Drupal.settings.googleanalytics;
     // Expression to check for absolute internal links.
     var isInternal = new RegExp("^(https?):\/\/" + window.location.host, "i");
@@ -37,5 +46,5 @@
         }
       }
     } catch(err) {}
-  });
-}
+  }
+});
