0Localisation of Amazon Affiliates links

I occasionally reference products on my various websites, and usually link them to Amazon for anyone interested in buying them. A long time ago I used to link with an amazon affiliates link but never earned anything from it as my typical readership is well distributed around the world. Unfortunately Amazon don’t provide a way to redirect visitors to their local amazon site whilst retaining to affiliates payments. There are various solutions out there but all the ones I found had issues with them, so I developed my own.

I could develop it into a plugin for release if there is sufficient demand. In the meantime, the code is below. You will need to make some modifications to make it match your site address and your amazon affiliates codes

Note – the code is currently early draft.  It works, but it doesn’t make use of some of the detection that it can do.  It doesn’t have a settings page for the associate IDs, and it uses a hardcoded site address, rather than an invisible redirect.  It DOES however use client-side javascript to generate a unique redirect url every time to prevent any caching systems from causing incorrect location detection.

Think we’ve missed something? Let us know by commenting below. If you would like to subscribe please use the subscribe link on the menu at the top right. You can also share this with your friends by using the social links below. Cheers.

Leave a Reply