Saturday, February 13, 2010

Amazon Associates Bookmarklet

Amazon Associates Bookmarklet

A bookmarklet to convert any Amazon product page into a page 'tagged' with your Amazon Associates ID

Amazon Associates Bookmarklet v1.1

To use this bookmarklet, follow these steps:

  1. Drag the above link to your browser's toolbar.
  2. Edit the JavaScript to reflect your Amazon Associates ID (i.e., change "justinblanton-20" to your ID).
  3. Click the bookmarklet while you are on any Amazon product page.
  4. Wait for the page to refresh and then, depending on your intended use, either do nothing or copy/paste the URI that's now in the address bar.

I've tested this only on Firefox and Safari, but it should work with most any web browser.

*Disclaimer*: I love Amazon. And I have Amazon Associates account that gives me a chance to send people to Amazon thru my referral links and get paid. I usually generate about 10 bucks in 6 months, so this is more like fun rather than a business. :)

Anyways, after getting tired of Firefox slowness on my Mac laptop and moving to Safari, I found that I missing the Amazon Affiliates plugin more than I thought I would. Even after Amazon has added a site bar on the top of the page, it still needs too much of clicks and keystrokes.

So I thought that I would do a quick bookmarklet to make a proper affiliates link for Amazon pages. However, Googling first, I found this link and it was working fine.

With one little issue - the link was still too long. Well, it's much shorter than what Amazon gives to me, but still long. So I tweaked the Javascript code a little bit to make it produce a better links:

Was:

http://www.amazon.com/exec/obidos/ASIN/B0015T963C/iwhite-20/ref=nosim/

Now:

http://www.amazon.com/dp/B0015T963C/?tag=iwhite-20

You can probably do well without URL shortener now.

Here is the code:

javascript:aid='iwhite-20';asin='';if(document.getElementById('ASIN')){asin=document.getElementById('ASIN').value;document.location='http://www.amazon.com/dp/'+asin+'/\?tag='+aid}else{alert('I\'m%20sorry,%20but%20an%20ASIN%20can\'t%20be%20found.%20Please%20make%20sure%20you\'re%20on%20an%20individual%20product%20page.')}

Sorry if it doesn't read well - I don't know all the tricks of Posterous' bookmarklet, yet, too. :) Enjoy.

# Posted via web from opportunity__cost