Ever since my recent redesign (and subsequent drastic increase in activity), I’ve started using Amazon.com Affiliate links when linking to good books, games, and so forth that I am currently experiencing. I hate the idea of advertisements on Beckism.com, and since I was planning on sharing opinions on books/etc. anyway, this seems like a pretty unobtrusive way to create a small possibility of revenue. My pie-in-the-sky dream is that someday Beckism.com will pay for its own hosting costs. That will be a good day.
In any case, I’ve only recently started using Amazon.com affiliate links, and may I just say that Amazon.com has a terrible system. You have to visit their Affiliate Central. Then log in. Then view all their widgets and so forth. Then choose the Product Links option. Then search for your product. Find the product in the search results. Die of boredom.
And the URL’s hideously long. Some monstrosity like this:
It makes me cringe. I’ve been searching for a way to quickly build my own Amazon.com Affiliate links; since I’m just using simple text links, I see no reason to jump through Amazon’s hoops. My goal was something that doesn’t require me to sign into Amazon and that gives me drastically shorter URLs (because long URLs make it difficult for me to read my post’s code):
These do not seem to me impossible demands. I searched for a Mac OS X Dashboard widget that would let me find products on Amazon and automatically generate an affiliate link: no love. Searched for blog posts about how to do this: Dave Taylor had some interesting advice, but it seemed outdated (given that I’ve never seen the types of URLs that he uses as examples before), and Noah Coad’s regex, while definitely good to know for non-affiliate links, doesn’t mention how to append an affiliate ID. Chris Thomson posted Using Amazon Associates Easily in MarsEdit recently, but his solution churns out hideously long URLs (and his MarsEdit macro forces you to input text; I don’t like doing that).
So here’s what I’ve come up with, which is hardly revolutionary. First step is to search for something via Amazon’s normal webpage (forget that convoluted affiliate link generating crap). You’ll get something hideous like this:
Yuck. The part that you want is the string of letters and numbers immediately after
/dp/. This is the product ID. Copy it out of your address bar.
Now you just need to construct your shortened version. Insert the product ID into a URL that looks like this:
Of course, use your own Amazon.com affiliate ID instead of “beckism-20”, and stick the product ID after
This link is the smallest format that I can find that is recommended by multiple people on the Amazon Affiliate discussion boards.
I’m curious, however, if Dave Taylor is still correct about just slapping the tracking ID onto the end. If you’d like to help me test this, click here (I don’t expect you to buy Neverending Story, although it’s a classic and well worth reading, but in a day or so the affiliate reports will show that someone clicked a link, and then I’ll know for sure; currently the affiliate ID in the link hasn’t been published anywhere else).
I’m sure this is a common problem, so let me know in the comments if you’ve heard of a better way. Also, be aware that there’s the possibility that shortening your links down like this may disable some of Amazon’s fancy reporting stuff. I have no idea (or any way to test it).
Lastly, if you’re using MarsEdit, you can make the link creation process incredibly easy. Open up a post (or new post) and choose the “Markup” dropdown in the toolbar (or select Post→Text Markup→Edit). Click the + button to add a markup macro, name it whatever you like, and stick this in the opening tag:
(Again, replace “beckism-20” with your Amazon Affiliate tag.) The closing tag is obviously just
</a>. If you like, assign a keyboard shortcut for easy access. All you need to do to use the macro is to copy the product’s ID (which follows
/dp/ in the standard Amazon URL) before selecting the MarsEdit macro. The macro will deal intelligently with selected text (or lack thereof) without your needing to do a thing.
Update April 13, 2008: After a couple of other people have tested the linking in the comments (and having myself tried both the shortest method and the method I recommend in the article above), it turns out that the format
http://www.amazon.com/dp/0525457585/beckism-20 does not work. The shortest format you can use is
http://www.amazon.com/dp/0525457585/?tag=beckism-20 (a similar format is additionally cited on Amazon’s own blog, so presumably it will be valid for the foreseeable future).
Thanks for the link love. I’m one who hates long URLs too, but for the end user, I want them to see the shortest URLs possible for after they click them. It’s a personal preference, really.
I do like your #pastetext# idea for the product ID. Good thinking. I’m changing my MarsEdit settings to reflect that. :)
Thanks again for the link love.
Posted 5:09 PM on Feb. 24, 2008 ↑
Thanks for writing a useful article on the topic! I had a terrible time finding info about this, which is surprising given the number of people you’d think must come up against the issue.
Glad you like #pastetext#. I figured I’ll never use the macro unless I have a product ID in the first slot of my clipboard, so it seemed like a good idea.
Posted 5:17 PM on Feb. 24, 2008 ↑
Glad you enjoyed it! The tracking ID got a couple hits, so it looks like this format will indeed work:
Obviously you’ll need to replace the number with the product ID and “beckism-20” with your affiliate ID.
I’m going to do a little more testing with alternates and another unused tracking ID, though, before I update the article, though. From some early tests I did (that I can now check on) it looks like while the code above will work fine, if you add a trailing backslash Amazon won’t notice the affiliate ID (so /beckism-20/ won’t work, while /beckism-20 will).
Posted 11:16 AM on Feb. 25, 2008 ↑
Good post. Any results yet for the shortest possible URL? viz. just putting the Associates ID after the Product ID?
Posted 10:37 AM on Feb. 25, 2008 ↑
Dude, you rule! I too recently started experimenting with Amazon affiliate links (and for the same reason, I don’t want to bombard people with ads, but if I’m going to genuinely recommend something anyway, what the hell?) and did a Google search trying to find a better way to solve the problem. And you double-rule for writing the MarsEdit macro so that I don’t have to!
Posted 3:36 PM on Feb. 27, 2008 ↑
Glad you found the article useful, Christina! I actually wrote it because I did that exact same kind of search and came up with zilch; seems odd that there isn’t more info out there about this.
Posted 3:50 PM on Feb. 27, 2008 ↑
If you use RocketPost, the affiliate tag is automatically added to your Amazon links. Just type in the tag in Tools/Affiliate Links:
Disclaimer: I designed the feature :)
Posted 8:32 PM on Mar. 27, 2008 ↑
Of course, the fact that RocketPost is Windows-only kind of cuts down on the usefulness for myself and most of the people who read this blog… :-)
Posted 10:19 PM on Mar. 27, 2008 ↑
I’m low volume when it comes to published amazon links, and even lower volume when it comes to clicked amazon links :). I have already made the mistake of having a trailing backslash after my links, but after having fixed that, it doesn’t seem like the clicks are coming through. The links definitely work. But I’m wondering how sure you are that this is a viable format?
Does this look right to you?
(sorry about the link, I’m just trying to make sure that I’m following you correctly).
Posted 1:30 PM on Mar. 28, 2008 ↑
As best I can tell, that link format should work. To help you test it, I clicked through, added the item to the shopping cart, and proceeded to checkout (didn’t buy it, though; sorry). Let me know if you don’t have a click on your link report tomorrow!
It’s always possible that the link format isn’t working with Amazon and I haven’t noticed because of my own low-volume clicks. :-)
If that’s the case, though, I’d like to know about it. My Amazon stats indicate that I have gotten clicks to the new link-style tracking ID, but far fewer than when I was using the old style. Possibly it isn’t working.
The format that I talk about in the original post (using ?tag=beckism-20) is one that I’m more confident about, too. If you try using it and have a noticeable increase in Amazon Affiliate links, can you let me know? I’d love to figure out once and for all what works and what doesn’t.
It’s ridiculous that Amazon doesn’t have any information about this kind of thing. I need to try and dig up a contact for them to see if support has any input.
Posted 4:27 PM on Mar. 28, 2008 ↑
Hmm… The last click I see is on 3/22 – definitely before I posted this.
I’m going to give it a shot with the tag= syntax – slightly longer, but maybe it will work.
Posted 12:04 PM on Mar. 29, 2008 ↑
You know, the ?tag=associatesid format is mentioned on the official associates blog here:
They specifically mention it as a way to link directly to the Kindle.
Posted 12:20 PM on Mar. 29, 2008 ↑
I’m taking over your comments here. Sorry. I did want to update you that the ?tag=affiliateid format is definitely showing clicks now. Thanks for your help tracking this down.
Posted 10:24 PM on Mar. 30, 2008 ↑
Hey Steve, no worries about taking over comments. Thanks for the info! That’s definitely good to know. I will convert my own links to the ?tag format, and will try to remember to update the article accordingly.
Posted 7:30 AM on Mar. 31, 2008 ↑
Thanks for the great post.
Do you happen to know if this shortened URLs work with other Amazon stores, like Amazon UK, DE, etc??
Posted 2:18 AM on Apr. 21, 2008 ↑
Firefox has an extension which generates these, called “Affiliator.”
Posted 8:58 AM on Apr. 26, 2008 ↑
Thank you for your good article. I concern about affiliate id after “?tag=xxx”. Is it necessary to use the associate id that amazon create for us? (the first id) I mean can I use my tracking Id which I had built instead?
Posted 3:35 AM on May. 1, 2008 ↑
If you’re created multiple tracking IDs (so that when you sign it says in the box at the upper left “Signed in as [Amazon-created ID]” and underneath has a drop down of tracking IDs), you can use any of the IDs in the Tracking IDs dropdown. For instance, the ID I used as an example in the article (beckism-20) is not the one supplied by Amazon (beckismcom-20).
Posted 6:16 AM on May. 1, 2008 ↑
Thank you so much Ian.
Your answer is very clear and i am brave enough to use it.
Posted 8:36 AM on May. 1, 2008 ↑
May I ask (again), how do you think about this link “hxxp://www.amazon.com/gp/bestsellers/books/? tag=associate id” ? I found someone used it.
Posted 5:38 AM on May. 10, 2008 ↑
My guess is that that link format will work fine (although please note I’ve never tested it). I think in general as long as ?tag=ID-20 is attached to the end correctly (that is, correctly in regards to URL syntax) that the link will probably work.
Posted 7:34 AM on May. 10, 2008 ↑
Much thanks, Ian! I was able to use the info here and in the comments to tweak Ecto3 to use the short URLs.
Posted 5:57 PM on Aug. 26, 2008 ↑
Glad to hear it! Any tips and tricks for other fans of Ecto 3 for getting it to work? It’s been so long since I last used Ecto that I can’t even think of how you might go about this. :-)
Posted 8:59 PM on Aug. 26, 2008 ↑
@ian: I’m new to the Mac world and still flip-flopping between ecto3 and MarsEdit2 :]
For ecto, under the Amazon Helper settings, I removed the incredibly long default string and replaced with this:
My setup just links the image, but there are variables included for the product name, as well.
Posted 9:06 PM on Aug. 26, 2008 ↑
Hah, ok I guess it didn’t like that link.
$asin$ is the ecto3 Amazon Helper variable for the all-important product ID string.
Posted 9:09 PM on Aug. 26, 2008 ↑
Thanks for the pointer! Such basic info, but hard to find…
Posted 4:08 PM on Aug. 29, 2008 ↑
Very helpful, but what do you do to track impressions?
Normally amazon uses a suedo image like this:
<img src=”http://www.assoc-amazon.com/e/ir?t=movie-remakes-20&l=as2&o=1&a=B0001US8F8″ width=”1″ height=”1″ border=”0″ alt=”” style=”border:none !important; margin:0px !important;” />
For now I am programmatically replacing the productID with my server side code.
Love the short URLs though, not I just save the product ID in my DB and generate the short url on the fly. awsome, becuase I can use the id to make image links, text links, etc…
Posted 9:28 PM on Oct. 17, 2008 ↑
One of the downsides to using the short syntax described above is that you can’t use some of Amazon’s more advanced tracking tools. This doesn’t really matter to me personally, since I’m not remotely trying to make a living off blogging, but it’s certainly something to keep in mind.
I’ve been using Mint to track visitor actions for some time, and I recently switched over to Get Clicky to track visitors across all my sites and have better access to historical data. Likely neither will work great for tracking Amazon Affiliate performance, but for my casual use both are definitely useful.
Posted 10:21 AM on Oct. 18, 2008 ↑
Hello – how did you obtain your affiliate id from Amazon?
Posted 5:32 PM on Nov. 3, 2008 ↑
Sign up for an Amazon affiliate account, and the affiliate ID should be in a box at the top right corner of the page when you log in (it’s very prominent). If you need further help with this, you should contact Amazon support.
Posted 6:25 PM on Nov. 3, 2008 ↑
Hello everyone, please can you help? First, thank you Mr Beck for this brilliant article. So, I would like to write about a group of items. I’d like to introduce them collectively, with a nice picture, before discussing each item separately. I’d like the picture to be clickable. Would be nice for the click to land on Amazon’s search result page for that item, and for me to get the credit. So I added the /?tag=ID on the end. Not work. I guess because I’ve introduced a second ‘?’. So I study my Amazon generated affiliate URL and try adding ‘&tag=ID’ . I get the search page and my ID in the browser window. My questions are, does that seem okay to you (I’m NOT techy at all)? and if a visitor then clicks on an item on that list, do I continue to get credit?
Sorry this is so long. I look forward to your reply. Thank you.
Posted 5:30 PM on Nov. 16, 2008 ↑
Although this seems like it should work to me, you’re best bet will probably be to use the Amazon tools to generate a link to the search results page (as long and hideous as it may turn out to be). I’ve only ever tested this shortened version of the Amazon URLs with products, so I’m not sure if it will work or not with other types of pages.
Just FYI, you can’t do two question marks in a URL because the question mark marks the place where the URL starts to list variables. The ampersand is what separates each variable so that the server knows where one ends and the next begins, which is why using the ampersand is more likely to work.
Posted 5:43 PM on Nov. 16, 2008 ↑
WOW, Mr Beck, thank you for replying so swiftly, and fully.
How do you use the Amazon tool to generate a link to the search results page? What do you put in the little box?
Posted 6:58 PM on Nov. 16, 2008 ↑
Make sure you’re signed into your affiliate account, and visit the main Amazon.com site. There should be a gray bar across the top of the page (if it’s not visible, there should be a little gray stripe with an arrow in it at the top left corner; click it to open the bar). On the left side of the bar is a button that says “Link to this page.” All you have to do is navigate to the search page, click the “Link to this page” button, and Amazon should walk you through the rest.
Posted 7:08 PM on Nov. 16, 2008 ↑
Aaaah (Very high pitched schriek)!!! Thank you so much. I’ve just spent 3 days trying to do that. Never spotted that grey stripe before. WOW! Thank you so so much.
Posted 7:38 PM on Nov. 16, 2008 ↑
I landed here because I was so frustrated I google, ” hate Amazon new design affiliate program” and I really do.
I agree with everyone, long ugly links, and it take forever to login, and get one darn link.
Really annoying. I end up spending 30 minutes wading through all the menu’s , especially with their new design. HATE it. Just give me a link for goodness sake. They force you to constantly “walk” though pages to get to where you are going.
Thanks for letting me vent!
Posted 12:24 PM on Nov. 25, 2008 ↑
Hi there – does anyone knoe if there’s any way to customise Amazon’s search widget? Or just create your own? It’s not as easy as appending your own ID ti the search query, is it?
The search widgets Amazon provides don’t look great. I just want a straightforward search box.
Hoping someone can help!!
Posted 4:25 PM on Feb. 1, 2009 ↑
Does anyone know if it matters from the consumer side if the link is clicked on a site or typed in? Is it a no-no for me to add my favorite charity to the end of all links using this format?
Posted 12:06 AM on Feb. 26, 2009 ↑
I don’t believe Amazon does any sort of referrer testing to verify the source of a link; as long as you aren’t the owner of the affiliate account, I doubt that they’ll care.
I haven’t tested this myself, though. If you want a definitive answer you’ll probably need to ask Amazon support.
Posted 8:10 AM on Feb. 26, 2009 ↑
Have you heard of Amazon’s new shorter domain, amzn.com? You can now link to any product with a URL like so: http://amzn.com/0525457585/?tag=beckism-20
It’s even shorter. Yay!
Posted 6:16 PM on Jul. 16, 2009 ↑
Thank you for sharing this very useful information with great explanations. I looked for a while and got conflicting answers before I found this article and was finally able to make sense of how the short link works (properly).
My question is, does it make a difference if it’s “dp” or “gp” before the product code? Because on the official amazon blog (link you posted), they use “gp”, but you used “dp”. And is the difference between them anyway?
Posted 5:11 PM on Apr. 16, 2010 ↑
Glad the post was useful!
I forget why I used
/gp/. If I remember correctly, it was what was being used by Amazon’s actual URLs at the time, which I effectively just pared down to the shortest version possible.
Posted 7:20 PM on Apr. 16, 2010 ↑
Ahh, got it! Thanks for the quick reply.
Posted 7:34 AM on Apr. 17, 2010 ↑
Thank you very much! I also was spending a half day while found your informative post!
About /dp/ or /gp/.
dp works ok (with my link) but gp instead creates 404!
Amazon gives several different link formats on their blog and I too could not figure out exactly why they use dp, gp, b, etc…………
I think it depends of their product categories or something like that.
So everybody needs to check their new link before!
Thanks to Joey Dey too!
You rock guys!
Posted 11:24 AM on Apr. 25, 2010 ↑
i have just signed up with the amazon affiliate program and i am still not earning a good deal of cash from them.-`.
Posted 10:25 PM on May. 17, 2010 ↑
I normally use this format
so, this already short for me and work!
Posted 5:31 AM on Dec. 5, 2010 ↑
Oh, man. It gets even better. I just noticed (and this may be old news, but it was new to me) Amazon has introduced a link shortening system similar to TinyURL that hashes the ASIN into a slug only six characters in length. To get the tiny URL all you have to do is click on one of the share links, like the Twitter link. I’ve tested this and tacking your affiliate tag onto the end of the short link still works. So, to recap, the following links all do the same thing:
Not shortened at all:
Shortened according to directions in the original post:
Shortened according to directions in my previous comment:
Shortened according to directions in this comment:
Posted 1:47 PM on Dec. 11, 2010 ↑
I am trying to make a short link to an Amazon product with my affiliate link.
I tried the examples above but it takes me to the wrong page of Amazon
Here is the link I built for the Philips Norelco Arcitec which the ASIN # is -B000PKKAGO
My link looks like this
BUT it takes me to a kindle page??
Any help would be appreciated – this is all new to me.
Posted 7:24 AM on Apr. 12, 2011 ↑
“The shortest format you can use is http://www.amazon.com/dp/0525457585/?tag=beckism-20.”
Actually, the shortest possible format is http://www.amazon.com/dp/0525457585?tag=beckism-20 (one slash fewer).
Do you know Amazon’s other associate endings like “-21” for Germany (amazon.de)?
Posted 11:08 AM on Jul. 6, 2011 ↑
I would appreciate an answer. :-)
Posted 8:10 AM on Jul. 16, 2011 ↑
No, I do not know whether Amazon’s associate endings for other countries end in different numbers. The best place to ask that would be Amazon Affiliate support or similar.
If you were asking something else, please restate the question.
Posted 8:22 AM on Jul. 16, 2011 ↑
Thanks for your answer, Ian.
I wasn’t asking whether Amazon’s other associate endings for other countries end in different numbers as I know they do. I was asking if you know what numbers the other associate endings are.
Posted 10:04 AM on Jul. 16, 2011 ↑
Yeah, I have no idea what the other numbers might be. Never looked into it.
Posted 8:39 PM on Jul. 17, 2011 ↑
Thank you, anyway.
Posted 5:42 AM on Aug. 10, 2011 ↑
Thank you for giving me a simple way out of the monstrosity of the amazon link!!!
Posted 1:31 PM on Jan. 23, 2012 ↑