? analytics_i18n.patch
? google_analytics_i18n3.patch
Index: googleanalytics.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/google_analytics/googleanalytics.module,v
retrieving revision 1.16.2.50
diff -u -p -r1.16.2.50 googleanalytics.module
--- googleanalytics.module	1 Oct 2008 06:49:06 -0000	1.16.2.50
+++ googleanalytics.module	9 Oct 2008 22:01:41 -0000
@@ -131,6 +131,18 @@ function googleanalytics_footer($main = 
       $url_custom = drupal_to_js(url('search/'. arg(1), array('query' => 'search='. $keys)));
     }
 
+    // If this node is a translation of another node, pass the original
+    // node instead.
+    if (module_exists('translation')) {
+      // Check we have a node object, it supports translation, and its
+      // translated node ID (tnid) doesn't match its own node ID.
+      $node = menu_get_object();
+      if ($node && translation_supported_type($node->type) && isset($node->tnid) && ($node->tnid != $node->nid)) {
+        $trans_node = node_load($node->tnid);
+        $url_custom = drupal_to_js(drupal_get_path_alias('node/' . $trans_node->nid, $trans_node->language));
+      }
+    }
+
     // Track access denied (403) and file not found (404) pages.
     if (function_exists('drupal_get_headers')) {
       $headers = drupal_get_headers();
