Another way is through using StatCounter - a free competitor to Google Analytic.
It has a pre-built external link tracking, which I use on a number of client sites to track exit links. This may be handy for affiliate tracking too. Attached is a screengrab of the exit link tracking dashboard