How can I use Javascript (Google Analytics) in my "Rewrite Results" in Views?
Views will indeed strip out onclick attributes.
You can work with data attributes and use an external JS file to add the onclicks.
Example for Views rewrite:

&lt;a href="#mylink" data-event-type="Download" data-event-xxxx="Windows"&gt;[myfield]&lt;/a&gt;


External Javascript (jQuery example):

jQuery(document).ready(function(){
 if(jQuery("a[data-event-type]"){
   jQuery("a[data-event-type]").click(function(){
    _gaq.push(['_trackEvent',jQuery(this).attr('data-event-type'),...........);
   });
 }
});