Index: sites/all/modules/contrib/views/handlers/views_handler_field.inc
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- sites/all/modules/contrib/views/handlers/views_handler_field.inc	(revision )
+++ sites/all/modules/contrib/views/handlers/views_handler_field.inc	(revision )
@@ -411,6 +411,7 @@
         'prefix' => array('default' => '', 'translatable' => TRUE),
         'suffix' => array('default' => '', 'translatable' => TRUE),
         'target' => array('default' => ''),
+        'onclick' => array('default' => ''),
         'nl2br' => array('default' => FALSE, 'bool' => TRUE),
         'max_length' => array('default' => ''),
         'word_boundary' => array('default' => TRUE, 'bool' => TRUE),
@@ -785,8 +786,16 @@
           'edit-options-alter-make-link' => array(1),
         ),
       );
+      $form['alter']['onclick'] = array(
+        '#title' => t('onClick Event (javascript)'),
+        '#type' => 'textfield',
+        '#default_value' => $this->options['alter']['onclick'],
+        '#description' => t("To allow for custom link tracking with piwik"),
+        '#dependency' => array(
+          'edit-options-alter-make-link' => array(1),
+        ),
+      );
 
-
       // Get a list of the available fields and arguments for token replacement.
       $options = array();
       foreach ($this->view->display_handler->get_handlers('field') as $field => $handler) {
@@ -1323,6 +1332,11 @@
     $target = check_plain(trim(strtr($alter['target'],$tokens)));
     if (!empty($target)) {
       $options['attributes']['target'] = $target;
+    }
+
+    $onclick = (trim(strtr($alter['onclick'],$tokens)));
+    if (!empty($onclick)) {
+      $options['attributes']['onclick'] = $onclick;
     }
 
     // Allow the addition of arbitrary attributes to links. Additional attributes
