You can use Google Analytics to track when a user clicks on a link that takes them to an external website using the code snippet in the link below:
https://support.google.com/analytics/answer/1136920?hl=en
However this method is flawed as it opens all links in the same window, regardless of the "target" attribute on the link. To get full link target support, use the code snippet below. In this example it is used in conjunction with a small jquery snippet to automatically track all links with the class "track" on a page.