YOURLS is a set of PHP scripts that will allow you to run Your Own URL Shortener. You'll have full control over your data, detailed stats, analytics, plugins, and more. It's free. To get started, check yourls.org! Learn more tweaks in the Wiki documentation.