« Optimizing Your Blog for Search Engines | Main | How to Make a Subject Index for Your Movable Type Blog »

Amazon Web Services

The Amazon Associates program allows you to receive a sales commission from the sale of Amazon products that you promote on your website. The easiest way to take advantage of the Amazon Associates program is to use Amazon's Build Links feature to build some simple links to specific products or groups of products. If you don't want to use the graphical ads that Amazon provides, you can customize the link and select a basic display to get the specific URL for the product you want.

Amazon.com also allows developers to tap directly into its product database through Amazon Web Services (AWS). In addition to simple product links, as an Amazon Associate, you can use a number of scripts, programs, and services to serve up ads that vary upon browser refresh and even full-fledged Amazon stores. Here are a few options:

rsContext

rsContext is a PHP script which displays ads for Amazon.com (and Amazon.co.uk) products, using Amazon Web Services. One benefit for rsContext ads is that they can easily be displayed as the "alternative ad" for Google's Adsense ads.

rsContext requires both PHP and MySQL. It helps to have access to phpMyAdmin or a tool like it to edit your MySQL database. The rsContext Setup Tool helps to generate the alternative ad code you need for the Google script.

Here's an example:


AzAdz

AzAdz is probably the easiest way to display randomized Amazon product ads on your site. The service is free, and hosts the ads on their own servers. You can control the colors and also specify which part of the Amazon product line from which to display product info, i.e. electronics, books, kitchen. The downsides are that it is a little slow to load and because it is free, it can't guarantee service levels.

By the way, if you put this script into an entry, rather than an index template, and you have "Text Formatting" set to "Convert Line Breaks" in your Edit Entry preferences, the script won't work, as MT will put line breaks after every line. One thing you can do is to set text formatting to "none" and put break tags (<br />) at the end of every paragraph. Or you can put the script in an MT template module and link the script to a file, e.g. azadz.inc. Then use a PHP include to pull it into your entry. Alternatively, you can wrap the script in an iframe tag.


AWS/ECS Random Item Script

The AWS/ECS (Amazon Web Services/E-Commerce Services) Random Item Script from Not One Bit.com lets you generate an ad displaying an item from the Amazon.com database, randomly selected from a predetermined section of that database.

To use the AWS Random Item script you will need a subscription ID and an associate ID (both free) from Amazon. You can get a subscription ID by registering for one at Amazon.com. You can get an Associate ID by joining Amazon's associate program. The pages of your weblog on which the ads appear must be php pages in order for the script to work. (See the Converting to PHP tutorial.)

You will also need to have the NuSOAP Toolkit for PHP loaded onto your server. The toolkit is available at SourceForge.net.

Can call up random items for sale from the Amazon database by an array of search type and key values. The default search types are "KeywordSearch", "BrowseNodeSearch", and "ArtistSearch". The script lists some other search types as well. The key values can be types of Amazon sections such as books, dvd, electronics, music, etc. BrowseNodes allow you to narrowly specify what part of the database from which you wish to draw random items. You can get a list of Browse Node Values from the Amazon.com site.

I use this script on some of my blogs, and it has worked quite well. I use an earlier version of the script that did not require NuSOAP installed, and I'm not sure what is all involved with installing this module to use with version 2.0 of the script.


MTAmazon and Media Manager BookQueueToo

MTAmazon and BookQueueToo are plugins that tap into Amazon's web services and can give MT blog creators power and flexibility when managing book lists on their blogs, much like what Typepad users have with their book typelists. (Note that BookQueueToo has recently morphed into Media Manager for MT 3.2. BookQueueToo does NOT work with MT 3.2.)

That's the good news.

The bad news is that they can be very hard to configure. BookQueueToo requires that you have the MTAmazon plugin installed and running on your server. MTAmazon requires that you have the following Perl modules installed on your server: XML::Simple, XML::Parser, File::Spec, and LWP::UserAgent. You can check to see if you have these modules installed by running the MT-check.cgi script (just go to your Main MT menu page and add a "-check" after the "MT" in the URL in your browser.) If you don't have the modules, you can get them from CPAN or ask your web host to install them.

I was not able to get these plugins working, even after days of collaborative effort with one of the geekiest friends I have (thanks Richard!) Since I was trying to install them just so I could have something useful to say about them in this tutorial, I gave up; it wasn't worth the effort.

A couple points about them though, you might find useful to know if you are considering using these plugins. MTAmazon hasn't been updated in a couple of years and its code is appropriate for Amazon Web Services, version 2.0. AWS is now up to version 4 and is backwards compatible with version 3, but not version 2. So if you want MTAmazon to work properly, you have to change a line of code in it. When I queried the MT ProNet, this is what ProNetter Dave Aiello said:

MTAmazon Version 2.22 only works with Amazon Web Services 2.� If you are using MTAmazon to communicate with Amazon.com using version 2 of their web services API, there are more problems than when you use version 3.� To use Amazon Web Services 3 with MTAmazon:

1. open the file cgi-bin/extlib/MTPlugins/MTAmazon.pm,
2. look for the string "xml2",
3. change it to "xml3".

Also, apparently XML::Simple will look for XML::SAX and will fall back on XML::Parser if you don't have XML::SAX installed.

Regarding BookQueueToo, even if you can get it to work properly, many people are experiencing a bug in which a BookQueueToo error message shows up frequently in the Activity log.


Full-featured Malls and Stores

Several companies provide both hosted solutions and scripts for creating "private-labeled" Amazon.com stores that you can integrate into your website or blog. Amazon ECS Tools and Applications for Associates details various methods - hosted solutions, PHP scripts and Perl Scripts that are available for a fee and for free. The LMT Tech Store and my Simply Recipes store both use a now obsolete version of one of these scripts, with a lot of custom code worked in. Note that the general consensus for most people who have used these services and scripts to build stores is that they are not worth the effort. I think that if you have a high traffic site with focused content, you could possibly make a content-focused store work for you, if it is well integrated into your site, but that you may be better off building a custom AWS solution or paying someone else to do it. The Amazon Associates Forum is the place to ask specific questions about these services and scripts. (Please do not ask me about these services, scripts, or stores. Post your questions regarding these in the Amazon forum.)


Amazon Associates Forums

Amazon.com hosts an informative and active forum for its Associates. You may need to log in with your Amazon ID to access these forums. One of the forums is specifically geared toward Amazon Web Services.


Links:
Amazon Web Services Blog - Amazon's own Typepad blog all about Web Services.
AzAdz
rsContext
Amazon E-Commerce Services Quick Start Guide
Amazon ECS Tools and Applications for Associates
Web Services - All about Amazon's Web Services program.
Amazon Associates Discussion Boards

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)