Affiliate Links with Alfred

When I released avTag I also signed up to Apple’s iTunes Affiliate Program (US Link UK Link). It’s a simple way to earn money when people buy iTunes items (music, films, iBooks, apps, etc.) via links you have supplied. After signing up all you need to do is append your affiliate program token to the end of an item’s URL. David Smith has a more detailed write-up which is worth reading.

The Affiliate Program gives you access to tools for creating links with your token appended but if like me you tend to pick up links from Twitter or from within the iTunes Store or App Stores themselves you might find my Alfred workflow handy.

When you trigger it (I have it set to ‘ita’ for ‘iTunes Affiliate’) it parses the contents of the clipboard (ideally an iTunes or App Store URL) and appends your affiliate token to the end. Optionally you can add a campaign name such as ‘blog’ or ‘twitter’ and that too gets added.

If you must, customise it by editing the AppleScript and enter your own affiliate ID at the top. I don’t mind if you leave mine in-place however!

Download the Alfred workflow

Update: Joe Workman pointed me towards Affiliate which does the same thing but for more services.