Many articles on Medium have all external links shortened to bit.ly URLs. Is that an option in the publishing interface? I find it extremely annoying, you can track outbound links using javascript without hiding the actual url.
I'm not sure how you can track links via javascript, but I do know how to make a bit.ly link.
If you want something simpler, just paste this into your page: https://gist.github.com/5899046