YOURLS is a URL shortener unlike any other, because you own the data. Much like WordPress, YOURLS is free and open-source, so you can install it on your own server and do with it as you please. This means that you can create short URLs anywhere you like and collect the data about those short URLs for your own use.
This gets even more powerful when you combine it with WordPress. WordPress has several functions that allow for the creation and usage of a short URL, like the_shortlink() and wp_get_shortlink(). With YOURLS, you can assign these customised short links to each post for usage inside your site. I’ve done this on several of my sites like my own personal site where a short link is added below the post if one exists:
The plugin powering all of this functionality is YOURLS Link Creator by Andrew Norcross. Once installed, you enter your API key from YOURLS, set when and how you want short links created and leave the rest to the plugin. Now, when you publish a post, a shortlink from your own URL shortener is automatically created for your use throughout your site and on social media, allowing you to collect the data for your use.