Code Posts:

Amazon Link Localizer Greasemonkey Script

Monday, September 28th, 2009

This Greasemonkey script will convert links to international Amazon sites into links to your local Amazon site.
So if I link to a product on Amazon.co.uk, you will get a link to that same product on Amazon.com instead.

Greasemonkey is an add-on for Firefox that allows you to run user-generated scripts on the websites you visit. If you haven’t got it yet, download it now, as you’ll need it to install the below script.

Once you’ve installed Greasemonkey, simply click the below link to install the script.

As you’re visiting from US, you’re probably looking for the Amazon.com Script, right?

Download: Amazon.com Link Localiser (or see all options)

Amazon Affiliate Link Localizer Wordpress Plugin

Friday, September 25th, 2009

Download

Current Version: Amazon Affiliate Link Localizer 1.3
Last Updated: 27/11/2009

Description

This plugin not only automatically changes any Amazon link on your site to use your affiliate ID, but it also changes the link to point to the user’s local Amazon store.

So if your visitor is visiting from the UK they’ll get a link to Amazon.co.uk, if they’re visiting from the US they’ll get a link to the same product on Amazon.com.

All you have to do is provide all your affiliate IDs!

Non-Wordpress version

If you want to achieve the same result on a non-Wordpress site, you can simply install the pure JavaScript version.

See also: Greasemonkey Script

As an Amazon user, you may also be interested in my Amazon Link Localizer Greasemonkey Script which automatically converts links to international Amazon sites into links to your local Amazon site.

So if I link to a product on Amazon.co.uk, and you are a US visitor, you will get a link to that same product on Amazon.com instead.

Disclosure

If you do not insert your own affiliate IDs the script will use mine. Hopefully this will help fund my book addiction!

JavaScript Amazon Associate Link Localiser

Tuesday, July 14th, 2009

I’ve been a member of Amazon’s Associate program for a number of years and have posted affiliate links to books discussed on this very blog. The program means that by putting my affiliate ID into any links to Amazon products, I receive a small referral fee.

I’ve always linked to Amazon.co.uk as that’s my local Amazon store, but of course that’s not necessarily true for my visitors – or yours…

To solve this problem, I’ve written some JavaScript which will convert any Amazon product links on your page into affiliated links to your visitor’s local Amazon store. So US visitors will get a .com link, whilst UK visitors will get a .co.uk link to the same product.

Download

Setup

Edit amazon.js to insert your regional Associate IDs into the array at the top, for example:

var arrAffiliates = {
	'co.uk' : 'petewill-19',
	'com'	: 'petewill-20',
	'de'	: 'petewill05-21',
	'fr'	: 'petewill-21',
	'ca'	: 'petewill00-20',
	'jp'	: ''
}

If you do not have an ID for each country, you can just leave them blank, as above for .jp.

Upload and Embed

As well as linking to amazon.js you need to link to the Google JS API file (5 kb) or the script will not work. Insert the following code just before your </body> tag:

<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript" src="amazon.min.js"></script>

Upload your modified amazon.js file, and make sure the above link points to the right location.

Usage

That’s it. You’re done! You can now just link to any product on any Amazon site with a normal, unaffiliated link and your users will get one affiliated for their country.

Example

The script is running on this page, so hopefully this example should be affiliated specially for you!

Disclosure

If you do not insert your own affiliate IDs the script will use mine. Hopefully this will help fund my book addiction!