YOURLS is a set of PHP scripts that allows you to run a URL shortner on your own self-hosted domain. You can either run a public or a private service, analyze each link's statistics, traffic sources and more.
For this project, it served a few important goals: first, it allowed us to post prettier and shorter URLs on Facebook and Twitter posts; second, it allowed us to centralize external links management; third, it allowed us to avoid the AdBlock hammer.
Installation is no big deal and I managed to run multiple instances (on different domains) using the same MySQL database; configuring Nginx was also pretty easy.