YOURLS Plugin: Skimlinks

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

  1. Download the plugin
  2. open plugin.php in your chosen text editor
  3. change YOURURL to your Skimlinks custom URL or if you don’t have a custom one.
  4. change YOURID to your Skimlinks site ID (you can find this here, on your account setting page)
  5. save the file and upload the skimlinks folder to /user/plugins
  6. 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 and expnading the redirect details.

6 Replies to “YOURLS Plugin: Skimlinks”

  1. Hi Matt,

    This isn’t something I would have thought to do, but I love the plugin idea. I’ve sent you a pull request on GitHub with the code as I edited it to run on my personal shortener. There wasn’t anything “wrong” with it, per se, but I felt like converting the code to use filters rather than overriding the core redirection code and die()ing.

    Thanks for the inspiration, and the free plugin!

    1. Hi,

      My install of YOURLS is private so only I can create the links which meant its just like using a branded version of the Skimlinks URL shortener.

      I don’t know of anyone successfully getting approved for a public setup. I think it’s against the terms and conditions.

  2. Does this still work with latest svn from yourls?
    I tested it but when lick on a short url from my server I see no redirect (checked with a debugger also)

    1. Hi,

      The current version on GitHub doesn’t work. I am working on a fix for YOURLS 1.6. Please download the one linked to from this page.

      I hope to have a new version of soon.

Leave a Reply

Your email address will not be published. Required fields are marked *