Les sous-répertoires piwik/modules et piwik_modif_rv/modules sont identiques.
diff -up piwik/piwik.admin.inc piwik_modif_rv/piwik.admin.inc
--- piwik/piwik.admin.inc	2009-06-16 12:43:26.000000000 +0200
+++ piwik_modif_rv/piwik.admin.inc	2010-10-13 19:35:51.000000000 +0200
@@ -140,6 +140,26 @@ function piwik_admin_settings_form(&$for
     '#default_value' => variable_get('piwik_trackfiles_extensions', PK_TRACKFILES_EXTENSIONS),
     '#description' => t('A pipe separated list of file extensions that should be tracked when clicked with regular expression support. Example: !extensions', array('!extensions' => PK_TRACKFILES_EXTENSIONS))
   );
+  
+  // Allows to configure if and how breadcrumb is used to set the piwikTracker.setDocumentTitle option in js code
+  $form['pagetitleshierarchy'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('Page titles hierarchy'),
+    '#collapsible' => TRUE,
+    '#collapsed' => FALSE,
+  );
+  $form['pagetitleshierarchy']['piwik_show_hierarchy_using_breadcrumb'] = array(
+    '#type' => 'checkbox',
+    '#title' => t("Show page titles hierarchy using Drupal's breadcrumb"),
+    '#description' => t("You can use Drupal's breadcrumbs settings to show the site's hierarchy in the Page titles report tab of Piwik"),
+    '#default_value' => variable_get('piwik_show_hierarchy_using_breadcrumb', 0),
+  );
+  $form['pagetitleshierarchy']['piwik_show_hierarchy_exclude_homepage'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Ignore home page level in breadcrumb'),
+    '#description' => t('Allows to prevent from having all the pages under one single "Home" entry. Hits to the home page will still be counted, but for other pages hierarchy will start at level Home+1 in the "Page titles" tab report'),
+    '#default_value' => variable_get('piwik_show_hierarchy_exclude_homepage', 1),
+  );
 
   // Advanced feature configurations.
   $form['advanced'] = array(
diff -up piwik/piwik.module piwik_modif_rv/piwik.module
--- piwik/piwik.module	2009-06-15 21:59:21.000000000 +0200
+++ piwik_modif_rv/piwik.module	2010-10-13 19:35:51.000000000 +0200
@@ -107,7 +107,25 @@ function piwik_footer($main = 0) {
     // Build settings code. See http://piwik.org/docs/javascript-tracking/
     $script = 'try {';
     $script .= 'var piwikTracker = Piwik.getTracker(pkBaseURL + "/piwik.php", '. drupal_to_js(variable_get('piwik_site_id', '')) .');';
-
+	
+    // Add a custom page title based on the breadcrumb to show site's hierarchy in reports
+    if (empty($url_custom) && (variable_get('piwik_show_hierarchy_using_breadcrumb', 0) == 1)) {
+      $drupal_breadcrumb = drupal_get_breadcrumb();
+      $piwik_breadcrumb = array();
+      
+      for ($i = 0; $i < count($drupal_breadcrumb); $i++) {
+        if (($i > 0) || (variable_get('piwik_show_hierarchy_exclude_homepage', 1) == 0)) {
+          $encoded_title = urlencode(strip_tags($drupal_breadcrumb[$i]));
+          
+          if (!empty($encoded_title) && ($encoded_title != '/'))
+            array_push($piwik_breadcrumb, $encoded_title);
+          }
+      }
+      
+      if (!empty($piwik_breadcrumb))
+        $url_custom = drupal_to_js(implode('/', $piwik_breadcrumb));
+    }
+    
     if (!empty($url_custom)) {
       $script .= 'piwikTracker.setDocumentTitle('. $url_custom .');';
     }
Les sous-répertoires piwik/tests et piwik_modif_rv/tests sont identiques.
Les sous-répertoires piwik/translations et piwik_modif_rv/translations sont identiques.
