Easily generate Amazon affiliate link with a Chrome extension

Update: I've published the extension on the Chrome Web Store, you can find it here.

Over the course of the weekend I had to generate some Amazon affiliate link to post on this blog, the problem is the links generated by Amazon own tool are too long.
For example the link to this item is 397 characters long.

So how did I solve this problem?
As you can guess from this post's title I wrote my own Chrome extension, you can find it on GitHub.

Installing and using the extension

The extension is not available on the Chrome Web Store(at the moment, things may change), to install it you have to:

  1. Download the zip from GitHub and unzip it
  2. Go to the Windows > Extensions page in Chrome
  3. Check Developer Mode
  4. Click load unpacked extension and select the extension's folder
  5. Click options and enter your tracking ID and hit save

Now visit any item page on Amazon.com, you should see an orange icon in the address bar, click it and copy the text in the field.

The extension in action

The generated link is way shorter than the Amazon's generated affiliate link, only 50 characters!

How it works

As you can see if you inspect the DOM, the form on the right has a hidden field with value equal to the item's code.
Also an affiliate url on amazon.com has this structure

http://amazon.com/dp/ + ASIN-CODE + /?tag=YOUR-CODE

When you have all the data getting the solution is easy 🙂

If you want to give this extension a try go get it on GitHub,
if you have any feedback feel free to contact me or open an issue on GitHub.

  • http://twitter.com/johnadamsonline John Adams

    Thansk pro; it's amazing and a much time saving tool!

  • Tevya Washburn

    How about making it use Amazon's "shortened" URL option: http://amzn.com/B00C18YUZU/?tag=fiddler05-20 is my affiliate link to a Samsung monitor. It's as short as possible (without using a 3rd party URL shortener) and great for putting into social media like Facbook and Google+ where the entire link is shown in the message. I can't find a bookmarklet or Chrome extension that does this for all Amazon pages. The one I used for this only works when there's clearly a product ID number in the URL. With searches and stuff it doesn't work. Really looking for a good solution that does the shortening as well.