O'Reilly logo

Amazon Hacks by Paul Bausch

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Deep Linking to Amazon’s Mobile Device Pages

If you’re developing an application for a mobile device, you can easily integrate with Amazon and collect referral fees in the process.

As the Internet expands beyond the world of desktop computers and browsers, Amazon is expanding as well by offering their services in a variety of alternate formats for alternate devices. They appropriately call these alternate formats Amazon Anywhere [Hack #7]. Of course these formats are also connected to the associates program, so you can collect referral fees by driving traffic to them.

Linking to Amazon Anywhere entry pages is straightforward, but linking directly to products or search results isn’t as obvious. If you’re developing a WAP application and want to link to an Amazon product for sale, or if you just want to browse directly to a product detail page like you can through Amazon’s web site, it’s a little tricky.

As with all Amazon URLs, once you know the pattern you can change the variables to get what you need. The base URL for Amazon Anywhere links contains four unchanging variables:

tag

Your Amazon associate tag [in Section 5.2 ]

creative

Your developer’s token Section 6.4

camp

Always set to 2025

link-code

Always set to xm2

So the base URL for any link will always contain these variables:

http://www.amazon.com/exec/obidos/redirect?tag=insert associate tag
            [RETURN]
&creative=insert developer token&camp=2025&link_code=xm2

The fifth variable, path, holds all the information about what format ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required