How can I use Javascript (Google Analytics) in my "Rewrite Results" in Views? I'm trying to track downloads as events in Google Analytics for file fields.  The links are displayed in Views using "Rewrite results."

I tried the following:

&lt;a onclick="var that=this;_gaq.push(['_trackEvent','Download','Windows',this.href]);setTimeout(function(){location.href=that.href;},400);return false;" href=[field_windows]&gt;Windows&lt;/a&gt;


But the onclick part gets stripped out by Views.  I know the Full HTML filter does this by default, but how do I get around it?
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'),...........);
   });
 }
});