Adding Amazon ads for different countries
Some time ago I started looking into ways to add Amazon products to help monetise a WordPress site. My major requirement was to automatically set my affiliate IDs for a range of different Amazon stores, with products appearing depending on a user’s worldwide IP location.
I was working on a site with a potentially global reach (aren’t they all?), and didn’t want to limit the potential by pushing people towards just one Amazon store. Here’s how I did it.
Amazon.com, .co.uk, .de?
Signing up to different Amazon stores gives different affiliate IDs each time. The stores appear to operate independently of one another, and there’s no way you can sign up to all in one go. This also means sorting out payment details can be quite laborious.
In the case of amazon.co.jp, I found the sign-up process completely baffling. Although the site has an English-language interface, the associates page used to sign up was in Japanese. I contacted the site and they said there were no plans to offer a translation. Using Google Translate took me so far, but Amazon.co.jp simply wouldn’t accept a UK postcode. The rogue field was “Postal Code (Hyphen enter into alphanumeric characters)”, and whatever I tried, it rejected my postcode.
Signing up to the others was more straightforward, particularly the English-language ones (.com, .ca and .co.uk). Then it was time to start putting ads on the site, and to target them depending on users’ locations.
Targeting users by country
To automatically select an Amazon store that nearest matches your user’s location, I initially tried a plugin called AZ-One. This locates the Amazon store (com, ca, co.uk, de, fr, jp) closest to your visitor and changes the associate links on your site to direct the visitor to the right store.
The plugin didn’t really work for me – it didn’t display prices or other information in the way I wanted. However, it did install the ip-to-country information I needed, which was handy. One that was in place I could uninstall and delete the plugin, leaving the IP info in my database.
There’s another, more complicated, plugin that adds this IP-country info, called WordPress IP to Country. I got baffled by the installation process, as I’m not a MySQL expert. However, the A-Z one did most of the geo installation for me, meaning all I needed from the IP to Country plugin was the php file.
Amazon machine tags
With the geo parsing in place, I used another plugin to actually display the Amazon products. It’s called Amazon Machine Tags, and it’s great.
There are various ways to display these (in an article, in a sidebar etc), detailed on the plugin site, but I used it to add products to articles. This involved a simple shortcode for each one. For example, to display The Beatles’ Rubber Soul all I have to do is add this to the text field:
[amtap amazon:asin=B0025KVLT2]
See how this looks on my Rubber Soul article. It’s the bit in the “Buy on Amazon” box (I added the container box myself, but the price, picture and everything else is brought in by the plugin).
The bit after asin= is the product code for the CD. These are used right across Amazon, and products normally have the same codes across the different international stores (some don’t, though, so look out for this).
With the IP to Country plugin also installed (and it’s the only way the plugin will work effectively for international users), it serves up the product from the Amazon store nearest the reader. So, people in the US see the price in US$, and those in England see the same product, only with prices in UKĀ£. If either clicks on the ad it will take them to the correct Amazon site. Brilliant.
The Amazon Machine Tags plugin also allows site owners to set their affiliate information, or to donate unused referral fees to the plugin authors (I’m doing this with my Japanese credits, should I get any). Give it a go – it’s been trickling money my way for some time.
Tags: Amazon