diff --git a/handlers/views_handler_field.inc b/handlers/views_handler_field.inc
index 65210d9..c7baaa4 100644
--- a/handlers/views_handler_field.inc
+++ b/handlers/views_handler_field.inc
@@ -411,6 +411,7 @@ class views_handler_field extends views_handler {
         '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,6 +786,15 @@ class views_handler_field extends views_handler {
           '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.
@@ -1325,6 +1335,11 @@ If you would like to have the characters \'[\' and \']\' please use the html ent
       $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
     // currently can only be altered in preprocessors and not within the UI.
     if (isset($alter['link_attributes']) && is_array($alter['link_attributes'])) {
