I’ve been using YOURLS as a custom URL shortener for some time now and I’ve been using Skimlinks to monetize my site for a little longer but until now it was a long process to create short links with my affiliate codes embedded.
When YOURLS 1.5 came out with support for plugins I decided to build my own to push all links shortened there through Skimlinks to add an alternative revenue stream and automatically embed affiliate code in every supported URL I shorten, a lot easier that before.
I have also made the decision to to publish the plugin and licence to code under the GPL.
The plugin is incredibly simple and doesn’t get in the way. In fact setting up the plugin is the most complex part.
Setup and Installation
- Download the plugin
- open plugin.php in your chosen text editor
- change YOURURL to your Skimlinks custom URL or redirect.skimlinks.com if you don’t have a custom one.
- change YOURID to your Skimlinks site ID (you can find this here, on your account setting page)
- save the file and upload the skimlinks folder to /user/plugins
- go to the plugins page in your YOURLS admin interface and activate the plugin
You can test if it works by entering one of your short URLS on longurl.org and expnading the redirect details.