How to add onclick event to widget image

I would use the Google Tag Manager firing options:

Or

Old school jQuery solution:

 function($){
      $('.widget_class').click(function() {
          ga('send', 'event', 'Sidebar Image', 'Promo Image', 'Clicked');
       });
   })(jQuery);

Now you just add a class name to your links.